Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1039
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Mar 24, 2018
1 parent 05e6389 commit d6ba8da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coders/art.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ static MagickBooleanType WriteARTImage(const ImageInfo *image_info,Image *image)
GrayQuantum,pixels,&image->exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
ThrowWriterException(CorruptImageError,"UnableToWriteImageData");
break;
(void) WriteBlob(image,(size_t) (-(ssize_t) length) & 0x01,pixels);
status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
image->rows);
Expand All @@ -361,6 +361,8 @@ static MagickBooleanType WriteARTImage(const ImageInfo *image_info,Image *image)
}
quantum_info=DestroyQuantumInfo(quantum_info);
pixels=(unsigned char *) RelinquishMagickMemory(pixels);
if (y < (ssize_t) image->rows)
ThrowWriterException(CorruptImageError,"UnableToWriteImageData");
(void) CloseBlob(image);
return(MagickTrue);
}

0 comments on commit d6ba8da

Please sign in to comment.