commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1582594 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
Date Fri, 28 Mar 2014 05:04:46 GMT
Author: bodewig
Date: Fri Mar 28 05:04:45 2014
New Revision: 1582594

URL: http://svn.apache.org/r1582594
Log:
COMPRESS-270 reading PAX headers may fail on unbuffered InputStreams

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java?rev=1582594&r1=1582593&r2=1582594&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
Fri Mar 28 05:04:45 2014
@@ -418,7 +418,7 @@ public class TarArchiveInputStream exten
                             String keyword = coll.toString(CharsetNames.UTF_8);
                             // Get rest of entry
                             byte[] rest = new byte[len - read];
-                            int got = i.read(rest);
+                            int got = IOUtils.readFully(i, rest);
                             if (got != len - read){
                                 throw new IOException("Failed to read "
                                                       + "Paxheader. Expected "



Mime
View raw message