Description
Describe the bug
#84899 introduced input parameter checking for flash read operations.
The introduced check incorrectly handles the corner case where a read is performed of size 0 into a NULL array. The read fails with error code -EINVAL
.
This introduces a difference between platforms when e.g. nvs_read
is used to retrieve the size of an already stored element as reported in #86981.
To Reproduce
See #86981.
Expected behavior
No difference between platforms.
Logs and console output
See #86981.
Environment (please complete the following information):
See #86981.