Skip to content

Commit e23b1da

Browse files
fix(rsdp): unaligned pointer deref
* Use `read_unaligned` instead. Signed-off-by: Anhad Singh <[email protected]>
1 parent 0476db6 commit e23b1da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aero_kernel/src/acpi/rsdp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl Rsdt<u32> {
114114
for i in 0..self.entries_count() {
115115
let item_addr_virt = unsafe {
116116
let ptr = header_data_address.add(i);
117-
PhysAddr::new(*ptr as u64).as_hhdm_virt()
117+
PhysAddr::new(ptr.read_unaligned() as u64).as_hhdm_virt()
118118
};
119119
let item = unsafe { Sdt::from_address(item_addr_virt) };
120120

0 commit comments

Comments
 (0)