commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1548924 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
Date Sat, 07 Dec 2013 15:10:10 GMT
Author: bodewig
Date: Sat Dec  7 15:10:10 2013
New Revision: 1548924

URL: http://svn.apache.org/r1548924
Log:
if you try to be defensive then do it right

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java?rev=1548924&r1=1548923&r2=1548924&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorInputStream.java
Sat Dec  7 15:10:10 2013
@@ -287,7 +287,7 @@ public class SnappyCompressorInputStream
             length = readOneByte();
             length |= (readOneByte() << 8);
             length |= (readOneByte() << 16);
-            length |= (readOneByte() << 24);
+            length |= (((long) readOneByte()) << 24);
             break;
         default:
             length = b >> 2;



Mime
View raw message