Skip to content

Commit f96b00a

Browse files
geoffw0paldepind
andauthored
Update rust/ql/src/queries/security/CWE-770/UncontrolledAllocationSizeGood.rs
Co-authored-by: Simon Friis Vindum <[email protected]>
1 parent fb22d55 commit f96b00a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/ql/src/queries/security/CWE-770/UncontrolledAllocationSizeGood.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const BUFFER_LIMIT: usize = 10 * 1024;
33

44
fn allocate_buffer(user_input: String) -> Result<*mut u8, Error> {
55
let size = user_input.parse::<usize>()?;
6-
if (size > BUFFER_LIMIT) {
6+
if size > BUFFER_LIMIT {
77
return Err("Size exceeds limit".into());
88
}
99
let num_bytes = size * std::mem::size_of::<u64>();

0 commit comments

Comments
 (0)