From a2b65555c921810aa291922ec239f7cc7b59cfa0 Mon Sep 17 00:00:00 2001 From: Jiaqi Gao Date: Wed, 30 Aug 2023 04:25:40 -0400 Subject: [PATCH] use `repr(C)` layout for `GuidExtension` It is important to use `repr(C)` layout for structures that are used for decoding/encoding from/into bytes. Signed-off-by: Jiaqi Gao --- td-uefi-pi/src/pi/hob.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/td-uefi-pi/src/pi/hob.rs b/td-uefi-pi/src/pi/hob.rs index 0c38d72b..af01b9df 100644 --- a/td-uefi-pi/src/pi/hob.rs +++ b/td-uefi-pi/src/pi/hob.rs @@ -351,6 +351,7 @@ impl Cpu { /// whose types are not included in this specification. Specifically, writers of executable content /// in the HOB producer phase can generate a GUID and name their own HOB entries using this /// module specific value. +#[repr(C)] #[derive(Copy, Clone, Debug, Pread, Pwrite)] pub struct GuidExtension { pub header: Header,