[
https://issues.apache.org/jira/browse/TIKA-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13657742#comment-13657742
]
Nick Burch commented on TIKA-1118:
----------------------------------
In r1482647 I've changed Apache POI to make it possible to fetch the size of a
PacakgePart.
To be a valid POIFS file, it must be at least 3 blocks big, so something at 0
bytes can't be valid and can safely be skipped. In r1482648 I've added
commented out logic to implement this, which can be enabled once there's a new
POI version + we upgrade. (For now, you should be fine to take a nightly
snapshot of POI for your build, and enable the block of code in Tika)
> OOXML parser throws when relationship points to 0 byte embedded part
> --------------------------------------------------------------------
>
> Key: TIKA-1118
> URL: https://issues.apache.org/jira/browse/TIKA-1118
> Project: Tika
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.3
> Environment: Tested on MAC and Ubuntu server
> Reporter: Lee Graber
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> I have a test document (pptx) where there is a 0 byte embedded part which is
> referenced in a relationship. I don't really know how the document got like
> this but Office can open it without any issues. The problem is in
> AbstractOOXMLExtractor::handleEmbeddedOle. It attempts to create a
> POIFSFileSystem:
> POIFSFileSystem fs = new POIFSFileSystem(part.getInputStream());
> using the part stream in the constructor but fails because of insufficient
> data. Given that the whole function except for this one line is in a try ->
> catch -> ignore, it seems like the best option is to put this line inside the
> try / catch. There is no metadata to extract from the 0 byte part.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira