Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions igvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1863,11 +1863,8 @@ impl IgvmDirectiveHeader {
// Copy the VMSA bytes into the VMSA, and validate the remaining bytes are 0.
// todo: zerocopy: as of 0.8, can recover from allocation failure
let mut vmsa = SevVmsa::new_box_zeroed().unwrap();
let (vmsa_slice, remaining) = data.split_at(size_of::<SevVmsa>());
let (vmsa_slice, _remaining) = data.split_at(size_of::<SevVmsa>());
vmsa.as_mut_bytes().copy_from_slice(vmsa_slice);
if remaining.iter().any(|b| *b != 0) {
return Err(BinaryHeaderError::InvalidVmsa);
}

IgvmDirectiveHeader::SnpVpContext {
gpa: header.gpa.into(),
Expand Down