This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/master by this push:
     new 04127fa  TIKA-3110 -- revert throwing IOException if a parser tries to 
skip past the end of an inputstream...make TikaInputStream live up to its Java 
contract at the risk of infinite loops in dependencies that weren't written 
with security in mind.
04127fa is described below

commit 04127faaa35a24479cfd47f460139a49c6dc80c7
Author: tallison <[email protected]>
AuthorDate: Fri Jun 12 15:33:44 2020 -0400

    TIKA-3110 -- revert throwing IOException if a parser tries to skip past the 
end of an inputstream...make TikaInputStream live up to its Java contract at 
the risk of infinite loops in dependencies that weren't written with security 
in mind.
---
 tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java 
b/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
index a0d0526..8a0b930 100644
--- a/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
+++ b/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
@@ -758,9 +758,6 @@ public class TikaInputStream extends TaggedInputStream {
             skipBuffer = new byte[4096];
         }
         long n = IOUtils.skip(super.in, ln, skipBuffer);
-        if (n != ln) {
-            throw new IOException("tried to skip "+ln + " but actually 
skipped: "+n);
-        }
         position += n;
         return n;
     }

Reply via email to