]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1492
authorCristy <mikayla-grace@urban-warrior.org>
Tue, 26 Feb 2019 16:51:49 +0000 (11:51 -0500)
committerCristy <mikayla-grace@urban-warrior.org>
Tue, 26 Feb 2019 16:51:49 +0000 (11:51 -0500)
MagickCore/profile.c

index ba460a805a2908f93f20ac89d14ec18dbc94ab6b..23a09de276fac2fee1aff69356cb0b849bc51960 100644 (file)
@@ -147,6 +147,9 @@ typedef struct _CMSExceptionInfo
 
   ExceptionInfo
     *exception;
+
+  size_t
+    signature;
 } CMSExceptionInfo;
 \f
 /*
@@ -474,6 +477,8 @@ static void CMSExceptionHandler(cmsContext context,cmsUInt32Number severity,
   cms_exception=(CMSExceptionInfo *) context;
   if (cms_exception == (CMSExceptionInfo *) NULL)
     return;
+  if (cms_exception->signature != MagickCoreSignature)
+    return;
   exception=cms_exception->exception;
   if (exception == (ExceptionInfo *) NULL)
     return;
@@ -887,6 +892,7 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name,
         cmsSetLogErrorHandler(CMSExceptionHandler);
         cms_exception.image=image;
         cms_exception.exception=exception;
+        cms_exception.signature=MagickCoreSignature;
         (void) cms_exception;
         source_profile=cmsOpenProfileFromMemTHR((cmsContext) &cms_exception,
           GetStringInfoDatum(profile),(cmsUInt32Number)