stub: add safety comment for PE parsing

This commit is contained in:
Julian Stecklina 2023-03-15 21:53:19 +01:00
parent 9c128e9ef6
commit 7060389698
1 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,10 @@ fn main(handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
print_logo();
// SAFETY: We get a slice that represents our currently running
// image and then parse the PE data structures from it. This is
// safe, because we don't touch any data in the data sections that
// might conceivably change while we look at the slice.
let config: EmbeddedConfiguration = unsafe {
EmbeddedConfiguration::new(
booted_image_file(system_table.boot_services())