Blame SOURCES/0003-Code-clarity-fix-for-calculation-of-data-member-addr.patch

c8bd4f
From 18f211c7f28d204e5676a30480b681519316d87f Mon Sep 17 00:00:00 2001
c8bd4f
From: George Almasi <gheorghe@us.ibm.com>
c8bd4f
Date: Mon, 11 Apr 2022 12:12:45 +0000
c8bd4f
Subject: [PATCH 3/9] Code clarity fix for calculation of data member addresses
c8bd4f
 when printing out UEFI_PLATFORM_FIRMWARE_BLOB2 structures.
c8bd4f
c8bd4f
Signed-off-by: George Almasi <gheorghe@us.ibm.com>
c8bd4f
---
c8bd4f
 lib/tpm2_eventlog_yaml.c | 2 +-
c8bd4f
 1 file changed, 1 insertion(+), 1 deletion(-)
c8bd4f
c8bd4f
diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c
c8bd4f
index d2d4aefe..647a2225 100644
c8bd4f
--- a/lib/tpm2_eventlog_yaml.c
c8bd4f
+++ b/lib/tpm2_eventlog_yaml.c
c8bd4f
@@ -536,7 +536,7 @@ bool yaml_uefi_platfwblob(UEFI_PLATFORM_FIRMWARE_BLOB *data) {
c8bd4f
 /* TCG PC Client PFP (02 dec 2020) section 10.2.5 */
c8bd4f
 bool yaml_uefi_platfwblob2(UEFI_PLATFORM_FIRMWARE_BLOB2 *data) {
c8bd4f
   UINT8 blobdescsize = data->BlobDescriptionSize;
c8bd4f
-  UEFI_PLATFORM_FIRMWARE_BLOB * data2 = (UEFI_PLATFORM_FIRMWARE_BLOB *)((UINT8 *)data + sizeof(UINT8) + blobdescsize);
c8bd4f
+  UEFI_PLATFORM_FIRMWARE_BLOB * data2 = (UEFI_PLATFORM_FIRMWARE_BLOB *)((UINT8 *)data + sizeof(data->BlobDescriptionSize) + blobdescsize);
c8bd4f
 
c8bd4f
   char * eventdesc = (char *)calloc (1, 2*blobdescsize+1);
c8bd4f
   if (!eventdesc) {
c8bd4f
-- 
c8bd4f
2.37.3
c8bd4f