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>
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: "