Skip to content

Panic when using read_box #2

@frewsxcv

Description

@frewsxcv
extern crate mp4parse;

use std::io::Cursor;

fn main() {
    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);
}
coreyf@frewbook-pro /t/mp4 (master) [101]> cargo run
   Compiling mp4 v0.1.0 (file:///private/tmp/mp4)
     Running `target/debug/mp4`
thread '<main>' panicked at 'invalid box size', /private/tmp/mp4parse-rust/src/lib.rs:233
Process didn't exit successfully: `target/debug/mp4` (exit code: 101)

panic discovered using afl.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions