commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: COMPRESS-271 must reset checksum before reading next frame
Date Sun, 05 Feb 2017 13:35:44 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 25ecc9b17 -> 2239893ab


COMPRESS-271 must reset checksum before reading next frame


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/2239893a
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/2239893a
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/2239893a

Branch: refs/heads/master
Commit: 2239893abcf199fa9d8cf4c63ff8ef0d904f5a23
Parents: 25ecc9b
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Sun Feb 5 14:31:52 2017 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Sun Feb 5 14:34:53 2017 +0100

----------------------------------------------------------------------
 .../compress/compressors/lz4/FramedLZ4CompressorInputStream.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/2239893a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
index e597b5a..115a2d6 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/FramedLZ4CompressorInputStream.java
@@ -254,8 +254,8 @@ public class FramedLZ4CompressorInputStream extends CompressorInputStream
{
             if (expectedHash != ByteUtils.fromLittleEndian(checksum)) {
                 throw new IOException("content checksum mismatch.");
             }
-            contentHash.reset();
         }
+        contentHash.reset();
     }
 
     private int readOneByte() throws IOException {


Mime
View raw message