From ddb2d457610a3848c405c2e1be3bd5143d0b5d7c Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 26 Feb 2019 11:51:49 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1492 --- MagickCore/profile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MagickCore/profile.c b/MagickCore/profile.c index ba460a805..23a09de27 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -147,6 +147,9 @@ typedef struct _CMSExceptionInfo ExceptionInfo *exception; + + size_t + signature; } CMSExceptionInfo; /* @@ -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) -- 2.40.0