MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / create_obj

Function create_obj

toys/use-after-free/src/main.rs:2–8  ·  view source on GitHub ↗
(i: i32)

Source from the content-addressed store, hash-verified

1fn drop_in_match() {
2 fn create_obj(i: i32) -> Option<Vec<i32>> {
3 if i > 10 {
4 Some(Vec::new())
5 } else {
6 None
7 }
8 }
9 let ptr = match create_obj(11) {
10 Some(mut v) => v.as_mut_ptr(),
11 None => std::ptr::null_mut(),

Callers 1

drop_in_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected