Reviewed-by: Eric Dong <[email protected]>
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of Dandan > Bi > Sent: Tuesday, March 01, 2016 10:52 AM > To: [email protected] > Cc: Qiu, Shumin; Dong, Eric > Subject: [edk2] [patch] MdeModulePkg: Add ASSERT to make sure pointers are > not NULL > > Cc: Qiu Shumin <[email protected]> > Cc: Eric Dong <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi <[email protected]> > --- > MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > index 9714dbc..f985b44 100644 > --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > @@ -578,10 +578,11 @@ LibIsSupportedFileType ( > if (InputFileType == NULL) { > return TRUE; > } > > TmpStr = AllocateCopyPool (StrSize (InputFileType), InputFileType); > + ASSERT(TmpStr != NULL); > LibToLowerString(TmpStr); > > IsSupported = (StrStr (gFileExplorerPrivate.FileType, TmpStr) == NULL ? > FALSE : TRUE); > > FreePool (TmpStr); > @@ -1355,10 +1356,11 @@ ChooseFile ( > > gFileExplorerPrivate.RetDevicePath = NULL; > gFileExplorerPrivate.ChooseHandler = ChooseHandler; > if (FileType != NULL) { > gFileExplorerPrivate.FileType = AllocateCopyPool (StrSize (FileType), > FileType); > + ASSERT(gFileExplorerPrivate.FileType != NULL); > LibToLowerString(gFileExplorerPrivate.FileType); > } else { > gFileExplorerPrivate.FileType = NULL; > } > > -- > 1.9.5.msysgit.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

