1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-19 16:58:04 +00:00
This commit is contained in:
Andrey Tkachenko 2023-10-19 12:26:15 +00:00 committed by GitHub
commit b5b9cbadfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,9 +33,7 @@ impl<R: Read + Seek> Mp4Reader<R> {
let header = BoxHeader::read(&mut reader)?;
let BoxHeader { name, size: s } = header;
if s > size {
return Err(Error::InvalidData(
"file contains a box with a larger size than it",
));
break;
}
// Break if size zero BoxHeader, which can result in dead-loop.