Skip to content

Commit

Permalink
fix req length calculation for set_key_pair_info.
Browse files Browse the repository at this point in the history
Signed-off-by: Jiewen Yao <[email protected]>
  • Loading branch information
jyao1 committed Dec 2, 2024
1 parent 9f26abf commit cb93d7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/spdm_requester_lib/libspdm_req_set_key_pair_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ static libspdm_return_t libspdm_try_set_key_pair_info(libspdm_context_t *spdm_co

*ptr = desired_assoc_cert_slot_mask;
ptr += sizeof(uint8_t);
spdm_request_size = sizeof(spdm_set_key_pair_info_request_t);
spdm_request_size += ((size_t)ptr - (size_t)spdm_request);
spdm_request_size = ((size_t)ptr - (size_t)spdm_request);
} else {
spdm_request_size = sizeof(spdm_set_key_pair_info_request_t);
}
Expand Down

0 comments on commit cb93d7a

Please sign in to comment.