Fix regression from 'Recalculate the entrysize in front of ...'

The patch 'Recalculate the entrysize in front of every USER_NVRAM blob'
did not properly account for the TPM_HANDLE when recalculating the
entry size of an OBJECT in NVRAM. As a consequence all OBJECTS and NVRAM
indices following the first OBJECT got lost.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2018-07-27 17:17:18 -04:00
parent a5a359f4ca
commit 1d918e5426

View File

@ -4370,7 +4370,7 @@ USER_NVRAM_Unmarshal(BYTE **buffer, INT32 *size)
NvWrite(entryRef + o + offset, sizeof(obj), &obj);
offset += sizeof(obj);
}
entrysize = sizeof(UINT32) + sizeof(obj);
entrysize = sizeof(UINT32) + sizeof(TPM_HANDLE) + sizeof(obj);
break;
default:
TPMLIB_LogTPM2Error("USER_NVRAM: "