From 5e91e043d2e270abf1ac0d623cde44f59ec732a0 Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Mon, 23 Dec 2024 21:15:04 +0800 Subject: [PATCH] Fix opaque data check size calculation issue. Signed-off-by: Jiewen Yao --- library/spdm_common_lib/libspdm_com_opaque_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/spdm_common_lib/libspdm_com_opaque_data.c b/library/spdm_common_lib/libspdm_com_opaque_data.c index 0375293cc5c..92e7115cd80 100644 --- a/library/spdm_common_lib/libspdm_com_opaque_data.c +++ b/library/spdm_common_lib/libspdm_com_opaque_data.c @@ -312,8 +312,8 @@ bool libspdm_process_general_opaque_data_check(libspdm_context_t *spdm_context, return false; } - opaque_element_data_len = *(uint16_t *)((size_t)(opaque_element_table_header + 1)) + - opaque_element_table_header->vendor_len; + opaque_element_data_len = *(uint16_t *)((size_t)(opaque_element_table_header + 1) + + opaque_element_table_header->vendor_len); current_element_len = sizeof(opaque_element_table_header_t) + opaque_element_table_header->vendor_len +