From d8012bdac063c24026abc42738b4b345a7e3d84e Mon Sep 17 00:00:00 2001 From: Peng85282 Date: Mon, 23 Dec 2024 19:04:58 -0700 Subject: [PATCH] Check invalid comp_comparison_stamp When use component comparison stamp, the stamp shall not be invalid. --- src/dsp/firmware_update.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsp/firmware_update.c b/src/dsp/firmware_update.c index 09c4f662..c0ca66a5 100644 --- a/src/dsp/firmware_update.c +++ b/src/dsp/firmware_update.c @@ -640,8 +640,8 @@ int decode_pldm_comp_image_info( pldm_comp_image_info->comp_version_string_length = data_header->comp_version_string_length; - if ((pldm_comp_image_info->comp_options.bits.bit1 == false && - pldm_comp_image_info->comp_comparison_stamp != + if ((pldm_comp_image_info->comp_options.bits.bit1 == true && + pldm_comp_image_info->comp_comparison_stamp == PLDM_FWUP_INVALID_COMPONENT_COMPARISON_TIMESTAMP)) { return PLDM_ERROR_INVALID_DATA; }