tpm2: Add an assert(profileJSON) since it must never be NULL

When profileJSON is passed to String_Marshal it must never be NULL.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2024-09-23 22:03:26 -04:00 committed by Stefan Berger
parent ab3da80dec
commit 6adb99a42c

View File

@ -5109,6 +5109,7 @@ PERSISTENT_ALL_Marshal(BYTE **buffer, INT32 *size)
PERSISTENT_ALL_MAGIC, blob_version);
if (blob_version >= 4) {
profileJSON = RuntimeProfileGetJSON(RuntimeProfile);
assert(profileJSON);
written += String_Marshal(profileJSON, buffer, size); // since v4
}
written += PACompileConstants_Marshal(buffer, size);