We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7feaf85 commit a0dac20Copy full SHA for a0dac20
examples/neverfree/Cargo.toml
@@ -0,0 +1,12 @@
1
+[package]
2
+name = "redhook_ex_neverfree"
3
+version = "0.1.0"
4
+authors = ["Geoffrey Thomas <[email protected]>"]
5
+edition = "2018"
6
+
7
+[lib]
8
+name = "neverfree"
9
+crate_type = ["dylib"]
10
11
+[dependencies.redhook]
12
+path = "../.."
examples/neverfree/src/lib.rs
@@ -0,0 +1,4 @@
+redhook::hook! {
+ // Can't have use-after-free vulnerabilities... if you never free anything
+ unsafe fn free(_ptr: *const ()) => my_free { }
+}
test.sh
@@ -18,3 +18,7 @@ cd examples/readlinkspy
18
cargo update
19
cargo build
20
preload libreadlinkspy ls -l /dev/stdin | grep readlink
21
22
+cd ../neverfree
23
+cargo update
24
+cargo build
0 commit comments