MdeModulePkg/EmuRuntimeDxe: Ignore keysizes of 0

This commit is contained in:
Jeremy Soller
2019-10-07 15:59:55 -06:00
committed by Tim Crawford
parent 394dfa9302
commit 3cc1bab6db

View File

@@ -1943,7 +1943,7 @@ VariableCommonInitialize (
while (i < read_cmd.bufsize) {
// assume native endian
UINT32 keysz = ((UINT32 *)(buf + i))[0];
if (keysz == 0xffffffff)
if (keysz == 0 || keysz == 0xffffffff)
break; // no more entries
UINTN valsz = ((UINT32 *)(buf + i))[1];