Refine code to fix potential code bug.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14949 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1287,7 +1287,7 @@ IsThisVarstore (
|
||||
//
|
||||
// If ConfigHdr has name field and varstore not has name, return FALSE.
|
||||
//
|
||||
if (Name == NULL && StrStr (ConfigHdr, L"NAME=&") == NULL) {
|
||||
if (Name == NULL && ConfigHdr != NULL && StrStr (ConfigHdr, L"NAME=&") == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user