Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check descriptor length before parsing #135

Merged
merged 1 commit into from Jan 7, 2018

Conversation

alfredoyang
Copy link
Contributor

There is an extra byte at the end of esds, in the original design, it runs into io error when reading data. That's an invalid descriptor frankly speaking, but it is good if we could tolerate this kind of error and keep parsing instead of returning an error.

the whole esds:
[3, 25, 0, 1, 0, 4, 19, 64, 21, 0, 0, 0, 0, 0, 0, 0, 0, 1, 119, 0, 5, 2, 18, 16, 6, 1, 2]
es descritor within esds:
[4, 19, 64, 21, 0, 0, 0, 0, 0, 0, 0, 0, 1, 119, 0, 5, 2, 18, 16, 6, 1, 2]
dc descriptor within es:
[5, 2, 18, 16, 6, 1]

The final 2 is redundant data.

https://bugzilla.mozilla.org/show_bug.cgi?id=1426773

@alfredoyang
Copy link
Contributor Author

hmm... it fails at test free_null_parser with nightly rustc. It looks like a bug in rustc nightly.

   1145	#[should_panic(expected = "assertion failed")]
   1146	fn free_null_parser() {
   1147	    unsafe {
-> 1148	        mp4parse_free(std::ptr::null_mut());
   1149	    }
   1150	}
   1151

@kinetiknz
Copy link
Collaborator

Changes LGTM, thanks.

Looks like the build has been failing on nightly since the 27th Dec weekly cron job. The last good build was the 20th (previous weekly cron job), so that gives us the window for the nightly regression.

@kinetiknz kinetiknz merged commit ec45de0 into mozilla:master Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants