mirror of
https://github.com/utmapp/edk2.git
synced 2026-12-01 07:53:33 -10:00
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3113 According to FAT specification, the length of file path should not larger than 260. When the length exceed 260, function FatLocateOFile will return EFI_INVALID_PARAMETER and the parameter FileHandle will be NULL. Then on the top-level function?an exception happens when the NULL pointer is passed and be used. So adding return value check after calling LibGetFileHandleFromMenu, if return value is not success, stop calling LibFindFiles. Cc: Jian J Wang <[email protected]> Cc: Hao A Wu <[email protected]> Cc: Dandan Bi <[email protected]> Cc: Eric Dong <[email protected]> Signed-off-by: Wenyi Xie <[email protected]> Reviewed-by: Liming Gao <[email protected]> Reviewed-by: Dandan Bi <[email protected]>