mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/SetupBrowserDxe: ASSERT GetBufferForValue(&Value)
Before called by GetBufferForValue(), Value has already been called function IsTypeInBuffer to make sure the value must be buffer type. So GetBufferForValue can not return NULL. This commit adds ASSERT to assume (GetBufferForValue (&Value) is not NULL. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
parent
3fb7e094ef
commit
0c1541d457
|
@ -1281,7 +1281,10 @@ IfrToUint (
|
|||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
ASSERT (GetBufferForValue (&Value) != NULL);
|
||||
Result->Value.u64 = *(UINT64*) GetBufferForValue (&Value);
|
||||
|
||||
if (Value.Type == EFI_IFR_TYPE_BUFFER) {
|
||||
FreePool (Value.Buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue