Skip to content
Commit 9b993bef authored by Peter Bigot's avatar Peter Bigot Committed by Anas Nashif
Browse files

subsys/fs/fatfs: correct misinterpretation of FatFs API



The FatFs f_readdir function returns OK with a zero-length file name
when the last directory entry has been found.  The Zephyr wrapper
unconditionally accessed fields that are left uninitialized in that
situation, propagating garbage values to the caller.

Avoid referencing uninitialized fields of the output structure in this
case.

Signed-off-by: default avatarPeter A. Bigot <pab@pabigot.com>
parent 2d083765
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment