Also ignore keysizes of 0

This commit is contained in:
Jeremy Soller
2019-10-07 15:59:55 -06:00
committed by Tim Crawford
parent 30c84e8277
commit a05aa4aff0

View File

@@ -1956,7 +1956,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];