]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30921
authorCristy <urban-warrior@imagemagick.org>
Wed, 23 Nov 2016 15:27:28 +0000 (10:27 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 23 Nov 2016 15:27:28 +0000 (10:27 -0500)
ChangeLog
coders/ept.c

index 3d6d0f48c212f994d293149a303b34ca2838e66e..3a91976d2f13c285852098e95fa200148b848cbf 100644 (file)
--- 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  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.3-7, GIT revision 19024:87aca83:20161115.
index 1c4885f5e50d0e81063c6db8b3db7d542e5d307d..9f1f52b5a2e4056e22e3be7ca6b7c8f54712c7cc 100644 (file)
@@ -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))