summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-29 06:33:23 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-29 06:33:23 +0000
commit04eb20aa85f658b86dd8b6b4fc261d2c9ff2e6a3 (patch)
tree5c99c188718cfc42810f70ad1f7f6fe0d216e37c /MdeModulePkg/Universal/SetupBrowserDxe
parent57ad9d43b16aada77eaf6f6e1aaa0dd94f032bf2 (diff)
downloadedk2-platforms-04eb20aa85f658b86dd8b6b4fc261d2c9ff2e6a3.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c1
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c1
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
index c42a18e3b0..2522d16deb 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
@@ -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.
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index 2fab5b79c9..c573fdbe15 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -533,6 +533,7 @@ DisplayForm (
if (!Suppress) {
StringPtr = GetToken (Statement->Prompt, Handle);
+ ASSERT (StringPtr != NULL);
Width = GetWidth (Statement, Handle);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
index 88a0590cf2..f97d91a2d6 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
@@ -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);