diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-03-13 10:00:19 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-13 10:14:21 +0100 |
commit | 565bf7514506110a53e37ca686a222527e1ed4e4 (patch) | |
tree | 0d5212539e7ff315c0d4b18441375fb542555e98 /media/libstagefright/binding/mp4parse/tests/afl.rs | |
parent | 90e68c3e3f4bb2f1a427a01586981e62bf74b898 (diff) | |
download | UXP-565bf7514506110a53e37ca686a222527e1ed4e4.tar UXP-565bf7514506110a53e37ca686a222527e1ed4e4.tar.gz UXP-565bf7514506110a53e37ca686a222527e1ed4e4.tar.lz UXP-565bf7514506110a53e37ca686a222527e1ed4e4.tar.xz UXP-565bf7514506110a53e37ca686a222527e1ed4e4.zip |
Remove Rust MP4 parser
Part 1 for #58
Diffstat (limited to 'media/libstagefright/binding/mp4parse/tests/afl.rs')
-rw-r--r-- | media/libstagefright/binding/mp4parse/tests/afl.rs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/media/libstagefright/binding/mp4parse/tests/afl.rs b/media/libstagefright/binding/mp4parse/tests/afl.rs deleted file mode 100644 index d4ffec0df..000000000 --- a/media/libstagefright/binding/mp4parse/tests/afl.rs +++ /dev/null @@ -1,53 +0,0 @@ -/// 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/. - -/// These all caused panics at some point during development. - -extern crate mp4parse; - -use std::io::Cursor; - -/// https://github.com/mozilla/mp4parse-rust/issues/2 -/// -/// Test a box with 4-byte size, smaller than the smallest header. -#[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_mp4(&mut c, &mut context); -} - -/// https://github.com/mozilla/mp4parse-rust/issues/4 -/// -/// Test a large (64 bit) box header with zero declared size. -#[test] -fn fuzz_4() { - let mut c = Cursor::new(b"\x00\x00\x00\x01\x30\x30\x30\x30\x00\x00\x00\x00\x00\x00\x00\x00".to_vec()); - let mut context = mp4parse::MediaContext::new(); - let _ = mp4parse::read_mp4(&mut c, &mut context); -} - -/// https://github.com/mozilla/mp4parse-rust/issues/5 -/// -/// Declares 202116104 compatible brands but does not supply them, -/// verifying read is properly bounded at the end of the stream. -#[test] -fn fuzz_5() { - let mut c = Cursor::new(b"\x30\x30\x30\x30\x66\x74\x79\x70\x30\x30\x30\x30\x30\x30\x30\x30".to_vec()); - let mut context = mp4parse::MediaContext::new(); - let _ = mp4parse::read_mp4(&mut c, &mut context); -} - -/// https://github.com/mozilla/mp4parse-rust/issues/6 -/// -/// Declares an ftyp box with a single invalid (short - 3 byte) compatible -/// brand and excludes the extra 3 bytes from the stream. -#[test] -fn fuzz_6() { - let mut c = Cursor::new(b"\x00\x00\x00\x13\x66\x74\x79\x70\x30\x30\x30\x30\x30\x30\x30\x30".to_vec()); - let mut context = mp4parse::MediaContext::new(); - let _ = mp4parse::read_mp4(&mut c, &mut context); -} |