diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-27 09:04:11 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-27 09:04:11 +0000 |
commit | 771ececd1288bb2bee8ea6fee61a1a0220914be5 (patch) | |
tree | 8322a497f5fed08816a28ee95c4d143bb49aa23b /MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | |
parent | 3978f5d92b31c42c2e6090409d1d83eefdb5face (diff) | |
download | edk2-platforms-771ececd1288bb2bee8ea6fee61a1a0220914be5.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Expression.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c index 90fdc7462f..45ec96edf1 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c @@ -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]);
}
}
}
|