mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Rust: Change the test copy of the example as well.
This commit is contained in:
@@ -291,7 +291,7 @@ const BUFFER_LIMIT: usize = 10 * 1024;
|
||||
|
||||
fn allocate_buffer_good(user_input: String) -> Result<*mut u8, Error> {
|
||||
let size = user_input.parse::<usize>()?;
|
||||
if (size > BUFFER_LIMIT) {
|
||||
if size > BUFFER_LIMIT {
|
||||
return Err("Size exceeds limit".into());
|
||||
}
|
||||
let num_bytes = size * std::mem::size_of::<u64>();
|
||||
|
||||
Reference in New Issue
Block a user