You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ap...@apache.org on 2006/11/02 16:23:49 UTC
svn commit: r470385 -
/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp
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);