mozilla / mp4parse-rust

Parser for ISO Base Media Format aka video/mp4 written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic when using read_box

frewsxcv opened this issue · comments

extern crate mp4parse;

use std::io::Cursor;

fn main() {
    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_box(&mut c, &mut context);
}

panic discovered using afl.rs

Pushed a fix here: kinetiknz@55d38ac

Merged in 55d38ac. Thanks!