hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r1029867 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/s3/S3InputStream.java
Date Mon, 01 Nov 2010 22:25:55 GMT
Author: tomwhite
Date: Mon Nov  1 22:25:54 2010
New Revision: 1029867

URL: http://svn.apache.org/viewvc?rev=1029867&view=rev
Log:
HADOOP-6975.  Integer overflow in S3InputStream for blocks > 2GB.  Contributed by Patrick
Kling.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1029867&r1=1029866&r2=1029867&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Mon Nov  1 22:25:54 2010
@@ -292,6 +292,9 @@ Trunk (unreleased changes)
     HADOOP-7011.  Fix KerberosName.main() to not throw an NPE.
     (Aaron T. Myers via tomwhite)
 
+    HADOOP-6975.  Integer overflow in S3InputStream for blocks > 2GB.
+    (Patrick Kling via tomwhite)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java?rev=1029867&r1=1029866&r2=1029867&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java Mon Nov  1 22:25:54
2010
@@ -128,7 +128,7 @@ class S3InputStream extends FSInputStrea
       if (pos > blockEnd) {
         blockSeekTo(pos);
       }
-      int realLen = Math.min(len, (int) (blockEnd - pos + 1));
+      int realLen = (int) Math.min((long) len, (blockEnd - pos + 1L));
       int result = blockStream.read(buf, off, realLen);
       if (result >= 0) {
         pos += result;



Mime
View raw message