diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-02-29 15:08:56 +0800 |
---|---|---|
committer | Feng Tian <feng.tian@intel.com> | 2016-03-02 15:18:56 +0800 |
commit | d0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11 (patch) | |
tree | d12da0cf5319008c5f777c8949a692c0f4a0ffa5 /MdeModulePkg | |
parent | 1b96026e14c2d6aba89e908d3f3e3aa54b6bdbe3 (diff) | |
download | edk2-platforms-d0d34cdf1d2752f0d7c3ca41af7e7ed29c221d11.tar.xz |
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')
-rw-r--r-- | MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 2 |
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;
|