MdeModulePkg/FvSimpleFileSystem:Fix a potential NULL dereference issue.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16562 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -499,6 +499,9 @@ FvSimpleFileSystemOpen (
|
|||||||
Instance = File->Instance;
|
Instance = File->Instance;
|
||||||
|
|
||||||
FileName = TrimFilePathToAbsolutePath (FileName);
|
FileName = TrimFilePathToAbsolutePath (FileName);
|
||||||
|
if (FileName == NULL) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
if (FileName[0] == L'\\') {
|
if (FileName[0] == L'\\') {
|
||||||
FileName++;
|
FileName++;
|
||||||
|
Reference in New Issue
Block a user