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
This commit is contained in:
Eric Dong 2014-04-10 02:28:01 +00:00 committed by ydong10
parent cc0b145e0f
commit d8adff447d
1 changed files with 2 additions and 0 deletions

View File

@ -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'.
//