8160098: Clean up color profiles

Reviewed-by: ssadetsky, bpb, mschoene
This commit is contained in:
Phil Race 2016-07-14 11:55:09 -07:00
parent 2ab2dc62ce
commit 7d3e084125

View File

@ -1543,6 +1543,13 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)
// 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);