From f255095973c0675e5e6c8269c83aefd7413eab42 Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Sun, 24 Sep 2023 12:38:03 -0400 Subject: [PATCH 1/3] Update dependencies libproc, bindgen --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7daa7c4..628ae5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ libc = "0.2.54" [target.'cfg(target_os="macos")'.dependencies] anyhow = "1.0.40" mach2 = "0.4.0" -libproc = "0.12.0" +libproc = "0.14.2" [target.'cfg(windows)'.dependencies] winapi = {version = "0.3", features = ["tlhelp32", "processthreadsapi", "handleapi", "impl-default", "dbghelp", "memoryapi", "sysinfoapi"]} [target.'cfg(target_os="freebsd")'.build-dependencies] -bindgen = { version = "0.60.1", optional = true } +bindgen = { version = "0.68.1", optional = true } [features] default = ["generate-bindings"] From 02c2c0c6510e78b0717f5c003ecfb8b698595faa Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Mon, 25 Sep 2023 17:19:19 -0400 Subject: [PATCH 2/3] No pointer arithmetic on void pointers --- src/win_maps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win_maps.rs b/src/win_maps.rs index e7983c1..34e76bc 100644 --- a/src/win_maps.rs +++ b/src/win_maps.rs @@ -204,7 +204,7 @@ fn get_process_page_ranges(pid: Pid) -> io::Result> { }); } - address = meminfo.BaseAddress.add(meminfo.RegionSize); + address = (meminfo.BaseAddress as *mut u8).add(meminfo.RegionSize).cast(); // as winapi::um::winnt::PVOID; } CloseHandle(process); From 7aecea13b996f1cc4c917b0d4019450d4b550df3 Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Mon, 25 Sep 2023 18:10:09 -0400 Subject: [PATCH 3/3] cargo fmt --- src/win_maps.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win_maps.rs b/src/win_maps.rs index 34e76bc..813ba6b 100644 --- a/src/win_maps.rs +++ b/src/win_maps.rs @@ -204,7 +204,9 @@ fn get_process_page_ranges(pid: Pid) -> io::Result> { }); } - address = (meminfo.BaseAddress as *mut u8).add(meminfo.RegionSize).cast(); // as winapi::um::winnt::PVOID; + address = (meminfo.BaseAddress as *mut u8) + .add(meminfo.RegionSize) + .cast(); // as winapi::um::winnt::PVOID; } CloseHandle(process);