harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
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 GMT
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, &currentTransform);
@@ -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, &currentTransform);
@@ -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, &currentTransform);



Mime
View raw message