Skip to content

Commit

Permalink
Add regression tests from fuzzing test cases.
Browse files Browse the repository at this point in the history
This is the test case from frewsxcv's fuzzing work,
generated by American Fuzzy Lop's rust support.

#2
  • Loading branch information
rillian committed Oct 27, 2015
1 parent 9eca3e7 commit e97cf8a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/afl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Regression tests from American Fuzzy Lop test cases.

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

extern crate mp4parse;

use std::io::Cursor;

/// https://github.com/mozilla/mp4parse-rust/issues/2
#[test]
fn fuzz_2() {
let mut c = Cursor::new(b"\x00\x00\x00\x04\xa6\x00\x04\xa6".to_vec());
let mut context = mp4parse::MediaContext::new();
let _ = mp4parse::read_box(&mut c, &mut context);
}

0 comments on commit e97cf8a

Please sign in to comment.