We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a3ca5f commit 474849cCopy full SHA for 474849c
src/efi/device_path.rs
@@ -53,7 +53,7 @@ impl DevicePath {
53
error!("Unexpected end of device path");
54
return DevicePath::Unsupported;
55
}
56
- let len = unsafe { core::mem::transmute::<[u8; 2], u16>(dpp.length) };
+ let len = u16::from_ne_bytes(dpp.length);
57
dpp = unsafe { &*((dpp as *const _ as u64 + len as u64) as *const _) };
58
59
0 commit comments