Skip to content
Commit 7a76792c authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Anas Nashif
Browse files

subsys: fs/nvs: break if no end of sector is found



In case a sector is not empty nor properly closed (ie it never contains
8 times 0xff nor 0x00), the _nvs_prev_ate will loop indefinitely and
will start adressing memory outside of the flash area.

Fix that by stopping the loop when the address matches the beginning of
the sector.

Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 725d9f7e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment