]> granicus.if.org Git - imagemagick/commitdiff
EPT Postscript and TIFF offsets must be greater than 30
authorCristy <urban-warrior@imagemagick.org>
Tue, 31 May 2016 22:18:31 +0000 (18:18 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 31 May 2016 22:18:31 +0000 (18:18 -0400)
coders/ept.c

index 464149dacf0baa2894d8a9eb0d699717557863f1..1c4885f5e50d0e81063c6db8b3db7d542e5d307d 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 < 0)
+  if (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 < 0)
+  if (offset < 30)
     ThrowReaderException(CorruptImageError,"ImproperImageHeader");
   count=ReadBlob(image,ept_info.postscript_length,ept_info.postscript);
   if (count != (ssize_t) (ept_info.postscript_length))