From d8adff447d234dd5bfafccfe3c1a5f2c858b6b02 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 10 Apr 2014 02:28:01 +0000 Subject: Check the pointer before use it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15445 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index a456a2b..35bd04b 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'. // -- cgit v1.1