From 97775b5090512ae52e27c3d6d0c503f88d47776a Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 31 May 2016 18:18:31 -0400 Subject: [PATCH] EPT Postscript and TIFF offsets must be greater than 30 --- coders/ept.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) -- 2.40.0