[ 
https://issues.apache.org/jira/browse/TIKA-5051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18139992#comment-18139992
 ] 

Hudson commented on TIKA-5051:
------------------------------

SUCCESS: Integrated in Jenkins build Tika ยป tika-main-jdk17 #1782 (See 
[https://ci-builds.apache.org/job/Tika/job/tika-main-jdk17/1782/])
TIKA-5051: skip MP4 boxes over 2 GB instead of stopping the walk (#3547) 
(github: 
[https://github.com/apache/tika/commit/847b2a2bfad028469a3180efaa26edc2b36a15b3])
* (edit) CHANGES.txt
* (edit) 
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/main/java/org/apache/tika/parser/mp4/TikaMp4Reader.java
* (edit) 
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/test/java/org/apache/tika/parser/mp4/MP4ParserTest.java


> MP4 metadata is lost when a box larger than 2 GB comes before moov
> ------------------------------------------------------------------
>
>                 Key: TIKA-5051
>                 URL: https://issues.apache.org/jira/browse/TIKA-5051
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> {{TikaMp4Reader}} stops the box walk with "Box size too large." as soon as 
> any box declares more than {{Integer.MAX_VALUE}} bytes, before it decides 
> whether the box is read or only skipped.
> Boxes Tika does not read, like {{mdat}}, are skipped by a stream advance and 
> never allocated, so their size does not matter. But a file with an {{mdat}} 
> over 2 GB in front of {{moov}} (common for camera recordings, which write 
> {{moov}} at the end) loses all metadata after it: no duration, dimensions, 
> dates, location or track data.
> The size check only needs to apply to boxes Tika actually reads into memory. 
> Those are already capped by {{maxBoxSize}} (100 MB by default).
> metadata-extractor's {{Mp4Reader}}, which {{TikaMp4Reader}} was copied from 
> (TIKA-4812), has the same check.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to