summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/FileExplorerLib
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-02-29 15:08:56 +0800
committerFeng Tian <feng.tian@intel.com>2016-03-02 15:18:56 +0800
commitd0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11 (patch)
treed12da0cf5319008c5f777c8949a692c0f4a0ffa5 /MdeModulePkg/Library/FileExplorerLib
parent1b96026e14c2d6aba89e908d3f3e3aa54b6bdbe3 (diff)
downloadedk2-d0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11.tar.gz
edk2-d0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11.tar.bz2
edk2-d0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11.zip
MdeModulePkg: Add ASSERT to make sure pointers are not NULL
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/FileExplorerLib')
-rw-r--r--MdeModulePkg/Library/FileExplorerLib/FileExplorer.c2
1 files changed, 2 insertions, 0 deletions
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;