-
Notifications
You must be signed in to change notification settings - Fork 7.4k
drivers: flash: flash_mcux_flexspi_nor incorrectly handles border case #87021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you transposed some numbers in those issues, I doubt the reproduction case is a LoRa PR :) |
Updated, thanks :) |
@Laczen do you have a recommended fix? |
Return 0 when the read/write length is 0 before checking the read/write buffer. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Parameter checking of flash read API expects checking for len == 0 before checking dest buffer validation. Fixes zephyrproject-rtos#87021 Signed-off-by: David Leach <david.leach@nxp.com>
Parameter checking of flash read API expects checking for len == 0 before checking dest buffer validation. Fixes zephyrproject-rtos#87021 Signed-off-by: David Leach <david.leach@nxp.com>
Parameter checking of flash read API expects checking for len == 0 before checking dest buffer validation. Fixes #87021 Signed-off-by: David Leach <david.leach@nxp.com>
Parameter checking of flash read API expects checking for len == 0 before checking dest buffer validation. Fixes zephyrproject-rtos#87021 Signed-off-by: David Leach <david.leach@nxp.com>
Parameter checking of flash read API expects checking for len == 0 before checking dest buffer validation. Fixes zephyrproject-rtos#87021 Signed-off-by: David Leach <david.leach@nxp.com>
Uh oh!
There was an error while loading. Please reload this page.
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.
The text was updated successfully, but these errors were encountered: