From: Cristy Date: Fri, 24 Nov 2017 14:36:24 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/877 X-Git-Tag: 7.0.7-12~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0a7241df0f889cc3158ba82774ff21fa1da87ec;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/877 --- diff --git a/coders/pgx.c b/coders/pgx.c index 4b616f68b..372e3b253 100644 --- a/coders/pgx.c +++ b/coders/pgx.c @@ -216,9 +216,11 @@ static Image *ReadPGXImage(const ImageInfo *image_info,ExceptionInfo *exception) pixels=(const unsigned char *) ReadBlobStream(image,length, GetQuantumPixels(quantum_info),&count); if (count != (ssize_t) length) - ThrowReaderException(CorruptImageError,"UnableToReadImageData"); - (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, + break; + status=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, GrayQuantum,pixels,exception); + if (status == MagickFalse) + break; if (SyncAuthenticPixels(image,exception) == MagickFalse) break; if (SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,image->rows) == MagickFalse)