File ImageMagick-CVE-2019-9956.patch of Package ImageMagick.11105
diff --git a/coders/ps.c b/coders/ps.c
index 4723f2b937..e0288b0990 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -2230,8 +2230,13 @@ RestoreMSCWarning
p+=GetPixelChannels(image);
}
q=PopHexPixel(hex_digits,(size_t) index,q);
- q=PopHexPixel(hex_digits,(size_t)
- MagickMin(length,0xff),q);
+ q=PopHexPixel(hex_digits,(size_t) MagickMin(length,0xff),q);
+ if ((q-pixels+6) >= 80)
+ {
+ *q++='\n';
+ (void) WriteBlob(image,q-pixels,pixels);
+ q=pixels;
+ }
if (image->previous == (Image *) NULL)
{
status=SetImageProgress(image,SaveImageTag,