From 6adb99a42cf6aed978ddff66e882cd9244c0be92 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 23 Sep 2024 22:03:26 -0400 Subject: [PATCH] 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 --- src/tpm2/NVMarshal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tpm2/NVMarshal.c b/src/tpm2/NVMarshal.c index 1b65116df..122d4dff0 100644 --- a/src/tpm2/NVMarshal.c +++ b/src/tpm2/NVMarshal.c @@ -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);