Add pointer check for NULL before dereference it.
Signed-off-by: ydong10 Reviewed-by: rsun3, lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12472 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1122,6 +1122,7 @@ GetSelectionInputPopUp (
|
||||
Link = GetNextNode (&Question->OptionListHead, Link);
|
||||
|
||||
StringPtr = GetToken (OneOfOption->Text, MenuOption->Handle);
|
||||
ASSERT (StringPtr != NULL);
|
||||
//
|
||||
// If the string occupies multiple lines, truncate it to fit in one line,
|
||||
// and append a "..." for indication.
|
||||
|
@@ -533,6 +533,7 @@ DisplayForm (
|
||||
|
||||
if (!Suppress) {
|
||||
StringPtr = GetToken (Statement->Prompt, Handle);
|
||||
ASSERT (StringPtr != NULL);
|
||||
|
||||
Width = GetWidth (Statement, Handle);
|
||||
|
||||
|
@@ -502,6 +502,7 @@ ProcessOptions (
|
||||
Character[0] = LEFT_ONEOF_DELIMITER;
|
||||
NewStrCat (OptionString[0], Character);
|
||||
StringPtr = GetToken (OneOfOption->Text, Selection->Handle);
|
||||
ASSERT (StringPtr != NULL);
|
||||
NewStrCat (OptionString[0], StringPtr);
|
||||
Character[0] = RIGHT_ONEOF_DELIMITER;
|
||||
NewStrCat (OptionString[0], Character);
|
||||
@@ -599,6 +600,7 @@ ProcessOptions (
|
||||
Character[0] = LEFT_ONEOF_DELIMITER;
|
||||
NewStrCat (OptionString[0], Character);
|
||||
StringPtr = GetToken (OneOfOption->Text, Selection->Handle);
|
||||
ASSERT (StringPtr != NULL);
|
||||
NewStrCat (OptionString[0], StringPtr);
|
||||
Character[0] = RIGHT_ONEOF_DELIMITER;
|
||||
NewStrCat (OptionString[0], Character);
|
||||
|
Reference in New Issue
Block a user