Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 27978 invoked from network); 12 Apr 2007 03:44:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2007 03:44:10 -0000 Received: (qmail 60758 invoked by uid 500); 12 Apr 2007 03:44:16 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 60740 invoked by uid 500); 12 Apr 2007 03:44:16 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 60731 invoked by uid 99); 12 Apr 2007 03:44:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 20:44:16 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 20:44:09 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 90B241A9838; Wed, 11 Apr 2007 20:43:49 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: xli@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070412034349.90B241A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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