mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
OvmfPkg/PlatformInitLib: do not ASSERT on an invalid NvVarStore
The varstore lives in writable pflash, so it is external input and an interrupted write or a crafted image can damage it. That needs an error path, not an ASSERT: a DEBUG build ends in CpuDeadLoop() with no output at all, while a RELEASE build already carries on without the emulated store. Log the error and return. Both callers ignore the return value, so the boot continues as it does in a RELEASE build. Signed-off-by: Denis V. Lunev <den@openvz.org>
This commit is contained in:
parent
5102939369
commit
e822c82b12
1 changed files with 1 additions and 1 deletions
|
|
@ -1003,7 +1003,7 @@ PlatformInitEmuVariableNvStore (
|
|||
ASSERT (Size < EmuVariableNvStoreSize);
|
||||
|
||||
if (!PlatformValidateNvVarStore (Base, PcdGet32 (PcdCfvRawDataSize))) {
|
||||
ASSERT (FALSE);
|
||||
DEBUG ((DEBUG_ERROR, "Invalid FlashNvStorage, EmuVariableNvStore not initialized.\n"));
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue