Add the missing check for NULL pointer before use it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10116 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1729,6 +1729,7 @@ EvaluateExpression (
|
||||
//
|
||||
Status = GetValueByName (OpCode->VarStorage, OpCode->ValueName, &StrPtr);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
ASSERT (StrPtr != NULL);
|
||||
TempLength = StrLen (StrPtr);
|
||||
if (OpCode->ValueWidth >= ((TempLength + 1) / 2)) {
|
||||
Value->Type = OpCode->ValueType;
|
||||
@ -1740,7 +1741,7 @@ EvaluateExpression (
|
||||
if ((Index & 1) == 0) {
|
||||
TempBuffer [Index/2] = DigitUint8;
|
||||
} else {
|
||||
TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempStr [Index/2]);
|
||||
TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempBuffer [Index/2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user