Skip to content

Commit 44b26e5

Browse files
committed
Rust: Change the test copy of the example as well.
1 parent f96b00a commit 44b26e5

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
@@ -291,7 +291,7 @@ const BUFFER_LIMIT: usize = 10 * 1024;
291291

292292
fn allocate_buffer_good(user_input: String) -> Result<*mut u8, Error> {
293293
let size = user_input.parse::<usize>()?;
294-
if (size > BUFFER_LIMIT) {
294+
if size > BUFFER_LIMIT {
295295
return Err("Size exceeds limit".into());
296296
}
297297
let num_bytes = size * std::mem::size_of::<u64>();

0 commit comments

Comments
 (0)