view patches/security/icedtea-6872357.patch @ 1692:2c854193cc9d

Add latest security patches 2009-11-03 Martin Matejovic <mmatejov@redhat.com> * patches/security/icedtea-6862968.patch * patches/security/icedtea-6863503.patch * patches/security/icedtea-6864911.patch * patches/security/icedtea-6872357.patch * patches/security/icedtea-6874643.patch * Makefile.am: apply the above
author Martin Matejovic <mmatejov@redhat.com>
date Tue, 03 Nov 2009 17:50:20 +0100
parents
children
line wrap: on
line source

--- old/src/share/native/sun/awt/image/awt_ImageRep.c	Mon Sep  7 14:46:10 2009
+++ openjdk/jdk/src/share/native/sun/awt/image/awt_ImageRep.c	Mon Sep  7 14:46:09 2009
@@ -266,6 +266,14 @@
     jnewlut = (*env)->GetObjectField(env, jicm, g_ICMrgbID);
     mapSize = (*env)->GetIntField(env, jicm, g_ICMmapSizeID);
 
+    if (numLut < 0 || numLut > 256 || mapSize < 0 || mapSize > 256) {
+        /* Ether old or new ICM has a palette that exceeds capacity 
+           of byte data type, so we have to convert the image data
+           to default representation.
+        */
+        return 0;
+    }
+
     srcLUT = (unsigned int *) (*env)->GetPrimitiveArrayCritical(env, jlut,
                                                                 NULL);
     if (srcLUT == NULL) {