summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2014-04-10 02:28:01 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2014-04-10 02:28:01 +0000
commitd8adff447d234dd5bfafccfe3c1a5f2c858b6b02 (patch)
treeb6b692bcdf409303c391f3ba48b58139a0fb9676 /MdeModulePkg/Universal/SetupBrowserDxe
parentcc0b145e0f828a26715d4b483abee9b0a56ad6f7 (diff)
downloadedk2-platforms-d8adff447d234dd5bfafccfe3c1a5f2c858b6b02.tar.xz
Check the pointer before use it.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15445 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index a456a2b21d..35bd04b16b 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -3870,6 +3870,7 @@ ConfigRequestAdjust (
if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
NextElementBakup = NextRequestElement;
NextRequestElement = StrStr (RequestElement, ValueKey);
+ ASSERT (NextRequestElement != NULL);
}
//
// Replace "&" with '\0'.
@@ -3879,6 +3880,7 @@ ConfigRequestAdjust (
if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
NextElementBakup = NextRequestElement;
NextRequestElement = StrStr (RequestElement, ValueKey);
+ ASSERT (NextRequestElement != NULL);
//
// Replace "&" with '\0'.
//