You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (Jira)" <ji...@apache.org> on 2020/04/01 16:00:11 UTC

[jira] [Created] (TIKA-3081) TikaInputStream's skip() should use the equivalent of IOUtils.skipFully()

Tim Allison created TIKA-3081:
---------------------------------

             Summary: TikaInputStream's skip() should use the equivalent of IOUtils.skipFully()
                 Key: TIKA-3081
                 URL: https://issues.apache.org/jira/browse/TIKA-3081
             Project: Tika
          Issue Type: Task
            Reporter: Tim Allison


Some parsers may assume that skip() returns the number of bytes actually skipped.  As we've learned, FileInputStream's return value can be completely divorced from reality, and it can report that the stream is skipping even past the EOF.

If we convert TikaInputStream's skip() to something that will throw an exception if a 3rd party parser tries to skip past the end of a file, we may prevent an entire class of bugs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)