Skip to content

Commit 287fd19

Browse files
committed
fix fuzz build
1 parent 97cf574 commit 287fd19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fuzz/fuzz_targets/encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![no_main]
22
use libfuzzer_sys::fuzz_target;
33

4-
use qoi::{encode_size_limit, encode_to_vec};
4+
use qoi::{encode_max_len, encode_to_vec};
55

66
fuzz_target!(|input: (bool, u8, &[u8])| {
77
let (is_4, w_frac, data) = input;
@@ -18,7 +18,7 @@ fuzz_target!(|input: (bool, u8, &[u8])| {
1818
let out = encode_to_vec(&data[..(w * h * channels as usize)], w as u32, h as u32);
1919
if w * h != 0 {
2020
let out = out.unwrap();
21-
assert!(out.len() <= encode_size_limit(w as u32, h as u32, channels));
21+
assert!(out.len() <= encode_max_len(w as u32, h as u32, channels));
2222
} else {
2323
assert!(out.is_err());
2424
}

0 commit comments

Comments
 (0)