From: Cristy Date: Wed, 23 Nov 2016 15:27:28 +0000 (-0500) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30921 X-Git-Tag: 7.0.3-8~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c10ae99851ff345f84f78e2761137b6fe0d3e290;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30921 --- diff --git a/ChangeLog b/ChangeLog index 3d6d0f48c..3a91976d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ https://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=30866). * Apply Debian patches, (reference https://github.com/ImageMagick/ImageMagick/issues/304). + * Permit EPT images with just a TIFF or EPS image, not both (reference + https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30921). 2016-11-15 7.0.3-7 Cristy * Release ImageMagick version 7.0.3-7, GIT revision 19024:87aca83:20161115. diff --git a/coders/ept.c b/coders/ept.c index 1c4885f5e..9f1f52b5a 100644 --- a/coders/ept.c +++ b/coders/ept.c @@ -214,14 +214,14 @@ static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) ResetMagickMemory(ept_info.tiff,0,(ept_info.tiff_length+1)* sizeof(*ept_info.tiff)); offset=SeekBlob(image,ept_info.tiff_offset,SEEK_SET); - if (offset < 30) + if ((ept_info.tiff_length != 0) && (offset < 30)) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); count=ReadBlob(image,ept_info.tiff_length,ept_info.tiff); if (count != (ssize_t) (ept_info.tiff_length)) (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageWarning, "InsufficientImageDataInFile","`%s'",image->filename); offset=SeekBlob(image,ept_info.postscript_offset,SEEK_SET); - if (offset < 30) + if ((ept_info.postscript_length != 0) && (offset < 30)) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); count=ReadBlob(image,ept_info.postscript_length,ept_info.postscript); if (count != (ssize_t) (ept_info.postscript_length))