changeset 11925:6c822cce8325 jdk8u111-b06

8160098: Clean up color profiles Reviewed-by: ssadetsky, bpb, mschoene
author prr
date Thu, 14 Jul 2016 12:28:15 -0700
parents 4e28cb985188
children c24be54e274e 90dba8b7ed55
files src/share/native/sun/java2d/cmm/lcms/cmsio0.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Mon Jul 18 19:24:54 2016 -0700
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Thu Jul 14 12:28:15 2016 -0700
@@ -1516,6 +1516,13 @@
     // If the element is already in memory, return the pointer
     if (Icc -> TagPtrs[n]) {
 
+        if (Icc -> TagTypeHandlers[n] == NULL) goto Error;
+        BaseType = Icc -> TagTypeHandlers[n]->Signature;
+        if (BaseType == 0) goto Error;
+        TagDescriptor = _cmsGetTagDescriptor(Icc-> ContextID, sig);
+        if (TagDescriptor == NULL) goto Error;
+        if (!IsTypeSupported(TagDescriptor, BaseType)) goto Error;
+
         if (Icc ->TagSaveAsRaw[n]) goto Error;  // We don't support read raw tags as cooked
 
         _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);