mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-12-22 03:56:28 +00:00
Relax error on box size mismatch
This commit is contained in:
parent
35560e94f5
commit
8f10458d56
1 changed files with 1 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue