Skip to content

Commit e35ec78

Browse files
committed
fuzz: Update fuzz targets after PR #200 landed.
1 parent eac4cd9 commit e35ec78

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

mp4parse_capi/fuzz/fuzz_targets/avif.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ fuzz_target!(|data: &[u8]| {
2424
userdata: &mut cursor as *mut _ as *mut std::os::raw::c_void,
2525
};
2626
unsafe {
27-
let context = mp4parse_avif_new(&io);
28-
29-
if mp4parse_avif_read(context) != Mp4parseStatus::Ok {
30-
mp4parse_avif_free(context);
27+
let mut context = std::ptr::null_mut();
28+
if mp4parse_avif_new(&io, &mut context) != Mp4parseStatus::Ok {
3129
return;
3230
}
3331

mp4parse_capi/fuzz/fuzz_targets/mp4.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ fuzz_target!(|data: &[u8]| {
2424
userdata: &mut cursor as *mut _ as *mut std::os::raw::c_void,
2525
};
2626
unsafe {
27-
let context = mp4parse_new(&io);
28-
29-
if mp4parse_read(context) != Mp4parseStatus::Ok {
30-
mp4parse_free(context);
27+
let mut context = std::ptr::null_mut();
28+
if mp4parse_new(&io, &mut context) != Mp4parseStatus::Ok {
3129
return;
3230
}
3331

0 commit comments

Comments
 (0)