harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r527761 - /harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java
Date Thu, 12 Apr 2007 03:43:49 GMT
Author: xli
Date: Wed Apr 11 20:43:48 2007
New Revision: 527761

URL: http://svn.apache.org/viewvc?view=rev&rev=527761
Log:
HARMONY-3623: fix bug that code depends on hash order

Modified:
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java?view=diff&rev=527761&r1=527760&r2=527761
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReaderSpi.java
Wed Apr 11 20:43:48 2007
@@ -55,7 +55,9 @@
 
         byte[] signature = new byte[8];
         markable.seek(0);
-        markable.read(signature, 0, 8);
+
+        int nBytes = markable.read(signature, 0, 8);
+        if(nBytes != 8) markable.read(signature, nBytes, 8-nBytes);
         markable.reset();
 
         // PNG signature: 137 80 78 71 13 10 26 10



Mime
View raw message