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

ASF GitHub Bot commented on TIKA-5051:
--------------------------------------

tballison merged PR #3547:
URL: https://github.com/apache/tika/pull/3547




> 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