harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r823160 - /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
Date Thu, 08 Oct 2009 13:05:27 GMT
Author: tellison
Date: Thu Oct  8 13:05:26 2009
New Revision: 823160

URL: http://svn.apache.org/viewvc?rev=823160&view=rev
Log:
Avoid potential long arithmetic overflow.

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java?rev=823160&r1=823159&r2=823160&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
Thu Oct  8 13:05:26 2009
@@ -408,7 +408,7 @@
 
         @Override
         public long skip(long n) throws IOException {
-            if (mOffset + n > mLength) {
+            if (n > mLength - mOffset) {
                 n = mLength - mOffset;
             }
             mOffset += n;



Mime
View raw message