From: Cristy Date: Tue, 31 May 2016 22:18:31 +0000 (-0400) Subject: EPT Postscript and TIFF offsets must be greater than 30 X-Git-Tag: 7.0.1-8~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97775b5090512ae52e27c3d6d0c503f88d47776a;p=imagemagick EPT Postscript and TIFF offsets must be greater than 30 --- diff --git a/coders/ept.c b/coders/ept.c index 464149dac..1c4885f5e 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 < 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))