Skip to content

Commit

Permalink
spdm: fixup measurement block length
Browse files Browse the repository at this point in the history
Signed-off-by: Wilfred Mallawa <[email protected]>
  • Loading branch information
twilfredo authored and alistair23 committed May 15, 2024
1 parent 90be1f0 commit aa5ea6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libspdm/spdm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,8 @@ unsafe fn libspdm_fill_measurement_image_hash_block(
(*measurement_block)
.measurement_block_common_header
.measurement_size = core::mem::size_of::<spdm_measurement_block_dmtf_header_t>() as u16
+ libspdm_rs::SPDM_MEASUREMENT_SPECIFICATION_DMTF as u16;
+ libspdm_rs::SPDM_MEASUREMENT_SPECIFICATION_DMTF as u16
+ data.len() as u16;

(measurement_block.add(1) as *mut u8).copy_from(data.as_ptr(), data.len());

Expand Down

0 comments on commit aa5ea6b

Please sign in to comment.