diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c index 98c81dbef9..9f75d6ede5 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c @@ -584,6 +584,7 @@ LibIsSupportedFileType ( } TmpStr = AllocateCopyPool (StrSize (InputFileType), InputFileType); + ASSERT(TmpStr != NULL); LibToLowerString(TmpStr); IsSupported = (StrStr (gFileExplorerPrivate.FileType, TmpStr) == NULL ? FALSE : TRUE); @@ -1361,6 +1362,7 @@ ChooseFile ( gFileExplorerPrivate.ChooseHandler = ChooseHandler; if (FileType != NULL) { gFileExplorerPrivate.FileType = AllocateCopyPool (StrSize (FileType), FileType); + ASSERT(gFileExplorerPrivate.FileType != NULL); LibToLowerString(gFileExplorerPrivate.FileType); } else { gFileExplorerPrivate.FileType = NULL;