From f2627169f9bf4474c20c90714f0fee9d418d477f Mon Sep 17 00:00:00 2001 From: Raoul Strackx Date: Wed, 28 Feb 2024 16:23:18 +0100 Subject: [PATCH] Fix type conversion --- intel-sgx/sgxs/src/sgxs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intel-sgx/sgxs/src/sgxs.rs b/intel-sgx/sgxs/src/sgxs.rs index 3b678c36..c987178d 100644 --- a/intel-sgx/sgxs/src/sgxs.rs +++ b/intel-sgx/sgxs/src/sgxs.rs @@ -418,8 +418,8 @@ impl SgxsWrite for W { let mut buf = [0u8; 64]; unsafe { let (tag, headerdst) = buf.split_at_mut(8); - let tag = &mut *(&mut tag[0] as *mut _ as *mut u64); - let headerdst = &mut headerdst[0] as *mut _; + let tag = &mut *(&mut tag[0..8] as *mut _ as *mut u64); + let headerdst = &mut headerdst[0..56] as *mut _; match meas { &ECreate(ref header) => {