diff src/share/native/sun/java2d/cmm/lcms/LCMS.c @ 3047:32cac17b629e

6963489: ZDI-CAN-803: Sun JRE ICC Profile Device Information Tag Remote Code Execution Vulnerability Reviewed-by: prr
author bae
date Thu, 01 Jul 2010 12:04:14 +0400
parents 00cd9dc3c2b5
children 33cc629889bd
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/LCMS.c	Wed Jun 30 16:24:37 2010 +0100
+++ b/src/share/native/sun/java2d/cmm/lcms/LCMS.c	Thu Jul 01 12:04:14 2010 +0400
@@ -190,12 +190,13 @@
                                        "sTrans.xf == NULL");
         JNU_ThrowByName(env, "java/awt/color/CMMException",
                         "Cannot get color transform");
+    } else {
+        Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, sTrans.j);
     }
 
     if (iccArray != &_iccArray[0]) {
         free(iccArray);
     }
-    Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, sTrans.j);
     return sTrans.j;
 }