Skip to content

Commit

Permalink
Fuzzing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Dec 28, 2024
1 parent b169d45 commit 1b7444a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fuzz/resize_rgba/resize_rgba.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ fn resize_rgba(
return;
}

let mut src_data = vec![0u8; src_width * src_height * 4];

let store = ImageStore::<u8, 4>::from_slice(&mut src_data, src_width, src_height).unwrap();
let store = ImageStore::<u8, 4>::alloc(src_width, src_height);
let mut target = ImageStoreMut::alloc(dst_width, dst_height);
let scaler = Scaler::new(sampler);
scaler.resize_rgba(&store, &mut target, false).unwrap();
let store = ImageStore::<u8, 4>::from_slice(&mut src_data, src_width, src_height).unwrap();
let store = ImageStore::<u8, 4>::alloc(src_width, src_height);
scaler.resize_rgba(&store, &mut target, true).unwrap();
}

0 comments on commit 1b7444a

Please sign in to comment.