OvmfPkg/VirtNorFlashDxe: sanity-check variables

Extend the ValidateFvHeader function, additionally to the header checks
walk over the list of variables and sanity check them.

In case we find inconsistencies indicating variable store corruption
return EFI_NOT_FOUND so the variable store will be re-initialized.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20240109112902.30002-4-kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: fix StartId initialization/assignment coding style]
This commit is contained in:
Gerd Hoffmann
2024-01-09 12:29:02 +01:00
committed by mergify[bot]
parent ae22b2f136
commit 4a443f73fd
2 changed files with 145 additions and 5 deletions

View File

@@ -34,6 +34,7 @@
DxeServicesTableLib
HobLib
IoLib
SafeIntLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiLib