diff --git a/src/windows/system.rs b/src/windows/system.rs index 36ab37bb2..64dc89fed 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -265,7 +265,7 @@ impl SystemExt for System { .as_ptr() .offset(process_information_offset) as *const SYSTEM_PROCESS_INFORMATION; - let pi = &*p; + let pi = &ptr::read_unaligned(p); process_ids.push(Wrap(p)); @@ -291,7 +291,7 @@ impl SystemExt for System { // able to run it over `process_information` directly! let processes = into_iter(process_ids) .filter_map(|pi| { - let pi = *pi.0; + let pi = ptr::read_unaligned(pi.0); let pid = Pid(pi.UniqueProcessId as _); if let Some(proc_) = (*process_list.0.get()).get_mut(&pid) { if proc_