view patches/icedtea-lcms.patch @ 1988:b5086c3910b3

Security updates. 2010-10-05 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Add new patches. * NEWS: List security updates. * patches/security/20101012/6559775.patch, * patches/security/20101012/6891766.patch, * patches/security/20101012/6914943.patch, * patches/security/20101012/6925710.patch, * patches/security/20101012/6938813.patch, * patches/security/20101012/6957564.patch, * patches/security/20101012/6958060.patch, * patches/security/20101012/6963023.patch, * patches/security/20101012/6963489.patch, * patches/security/20101012/6966692.patch: New security patches.
author Andrew John Hughes <ahughes@redhat.com>
date Tue, 05 Oct 2010 15:57:31 +0100
parents 868030b86280
children
line wrap: on
line source

diff -Nru openjdk.orig/jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c
--- openjdk.orig/jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c	2010-10-05 14:37:23.000000000 +0100
+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c	2010-10-05 14:38:50.132362650 +0100
@@ -692,6 +692,9 @@
                 }
                 FromLstarToXYZ(GrayTRC, Shapes1);
 
+                if (GrayTRC == NULL)
+                  return NULL;
+
                 // Reversing must be done after curve translation
 
                 Shapes[0] = cmsReverseGamma(Shapes1[0]->nEntries, Shapes1[0]);
@@ -707,6 +710,9 @@
 
                 GrayTRC = cmsReadICCGammaReversed(hProfile, icSigGrayTRCTag);   // Y
 
+                if (GrayTRC == NULL)
+                  return NULL;
+
                 Shapes[0] = cmsDupGamma(GrayTRC);
                 Shapes[1] = cmsDupGamma(GrayTRC);
                 Shapes[2] = cmsDupGamma(GrayTRC);
@@ -1346,7 +1352,7 @@
                      p -> ToDevice = PCStoShaperMatrix;
                      p -> OutMatShaper = cmsBuildOutputMatrixShaper(p->OutputProfile);
 
-                     if (!p -> OutMatShaper) {
+                     if (!p || !p -> OutMatShaper) {
                             cmsSignalError(LCMS_ERRC_ABORTED, "profile is unsuitable for output");
                             return NULL;
                             }
@@ -1923,6 +1929,8 @@
 
         ColorSpace = ColorSpaceIn;
 
+	Transforms[i] = NULL;
+
 
         if (ColorSpace == CurrentColorSpace) {