From: Cristy Date: Sat, 30 Mar 2019 12:47:09 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/1517 X-Git-Tag: 7.0.8-36~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee5b9c56b9ca18ed0750f8a15e0d1a6da92a6e99;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1517 --- diff --git a/coders/dpx.c b/coders/dpx.c index d69cd983f..f30763ecb 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -2022,8 +2022,10 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image, break; length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, quantum_type,pixels,exception); + if (length == 0) + break; count=WriteBlob(image,extent,pixels); - if (count != (ssize_t) length) + if (count != (ssize_t) extent) break; status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, image->rows);