Skip to content

Commit e6056f9

Browse files
redsun82geoffw0
andauthored
Update rust/ql/test/query-tests/security/CWE-770/main.rs
Co-authored-by: Geoffrey White <[email protected]>
1 parent d6d13b9 commit e6056f9

File tree

1 file changed

+1
-1
lines changed
  • rust/ql/test/query-tests/security/CWE-770

1 file changed

+1
-1
lines changed

rust/ql/test/query-tests/security/CWE-770/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ unsafe fn test_system_alloc(v: usize) {
199199

200200
let l3 = std::alloc::Layout::array::<u8>(10).unwrap();
201201
let m3 = std::alloc::System.alloc(l3);
202-
let _ = std::alloc::System.realloc(m3, l3, v); // $ Alert[rust/uncontrolled-allocation-size]
202+
let _ = std::alloc::System.realloc(m3, l3, v); // $ Alert[rust/uncontrolled-allocation-size]=arg1
203203

204204
let l4 = std::alloc::Layout::array::<u8>(10).unwrap();
205205
let m4 = std::ptr::NonNull::<u8>::new(std::alloc::alloc(l4)).unwrap();

0 commit comments

Comments
 (0)