Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 11946 invoked from network); 2 Nov 2006 15:24:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2006 15:24:14 -0000 Received: (qmail 51457 invoked by uid 500); 2 Nov 2006 15:24:25 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 51354 invoked by uid 500); 2 Nov 2006 15:24:25 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 51343 invoked by uid 99); 2 Nov 2006 15:24:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 07:24:25 -0800 X-ASF-Spam-Status: No, hits=-9.4 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; Thu, 02 Nov 2006 07:24:13 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 1F70B1A984A; Thu, 2 Nov 2006 07:23:49 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r470385 - /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp Date: Thu, 02 Nov 2006 15:23:49 -0000 To: harmony-commits@incubator.apache.org From: apetrenko@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061102152349.1F70B1A984A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: apetrenko Date: Thu Nov 2 07:23:48 2006 New Revision: 470385 URL: http://svn.apache.org/viewvc?view=rev&rev=470385 Log: Patch from HARMONY-1623 applied classlib][awt] Wrong address passed to releasePrimitiveArrayCritical() in native o.a.h.awt.gl.windows.GDIBlitter.bltImage() corrupts memory Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp?view=diff&rev=470385&r1=470384&r2=470385 ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp Thu Nov 2 07:23:48 2006 @@ -84,6 +84,7 @@ if(matrix != NULL){ jdouble * mtrx = (jdouble *)env->GetPrimitiveArrayCritical(matrix, 0); + jdouble * old_mtrx = mtrx; transform.eM11 = (FLOAT)(*mtrx++); transform.eM12 = (FLOAT)(*mtrx++); @@ -92,7 +93,7 @@ transform.eDx = (FLOAT)(*mtrx++); transform.eDy = (FLOAT)(*mtrx); - env->ReleasePrimitiveArrayCritical(matrix, mtrx, 0); + env->ReleasePrimitiveArrayCritical(matrix, old_mtrx, 0); SetGraphicsMode(dstSurf->gi->hdc, GM_ADVANCED); GetWorldTransform(dstSurf->gi->hdc, ¤tTransform); @@ -201,6 +202,7 @@ if(matrix != NULL){ jdouble * mtrx = (jdouble *)env->GetPrimitiveArrayCritical(matrix, 0); + jdouble * old_mtrx = mtrx; transform.eM11 = (FLOAT)(*mtrx++); transform.eM12 = (FLOAT)(*mtrx++); @@ -209,7 +211,7 @@ transform.eDx = (FLOAT)(*mtrx++); transform.eDy = (FLOAT)(*mtrx); - env->ReleasePrimitiveArrayCritical(matrix, mtrx, 0); + env->ReleasePrimitiveArrayCritical(matrix, old_mtrx, 0); SetGraphicsMode(dstSurf->gi->hdc, GM_ADVANCED); GetWorldTransform(dstSurf->gi->hdc, ¤tTransform); @@ -258,6 +260,7 @@ if(matrix != NULL){ jdouble * mtrx = (jdouble *)env->GetPrimitiveArrayCritical(matrix, 0); + jdouble * old_mtrx = mtrx; transform.eM11 = (FLOAT)(*mtrx++); transform.eM12 = (FLOAT)(*mtrx++); @@ -266,7 +269,7 @@ transform.eDx = (FLOAT)(*mtrx++); transform.eDy = (FLOAT)(*mtrx); - env->ReleasePrimitiveArrayCritical(matrix, mtrx, 0); + env->ReleasePrimitiveArrayCritical(matrix, old_mtrx, 0); SetGraphicsMode(dstSurf->gi->hdc, GM_ADVANCED); GetWorldTransform(dstSurf->gi->hdc, ¤tTransform);