From: Cristy Date: Mon, 5 Feb 2018 12:06:43 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6011 X-Git-Tag: 7.0.7-23~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78eaf41a792bb35a8b9e7ac4f72d86a8cb7d6d0a;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6011 --- diff --git a/coders/miff.c b/coders/miff.c index a4df93283..d42d5340c 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -930,7 +930,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, ThrowReaderException(ResourceLimitError, "MemoryAllocationFailed"); } - (void) SetImageProfile(image,keyword+8,profile,exception); + if (EOFBlob(image) == MagickFalse) + (void) SetImageProfile(image,keyword+8,profile, + exception); profile=DestroyStringInfo(profile); break; } diff --git a/coders/mpc.c b/coders/mpc.c index e2b9e1c05..35f75ea68 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -651,7 +651,9 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) ThrowReaderException(ResourceLimitError, "MemoryAllocationFailed"); } - (void) SetImageProfile(image,keyword+8,profile,exception); + if (EOFBlob(image) == MagickFalse) + (void) SetImageProfile(image,keyword+8,profile, + exception); profile=DestroyStringInfo(profile); break; }