File GraphicsMagick-CVE-2018-20184.patch of Package GraphicsMagick.9388
Index: GraphicsMagick-1.3.25/coders/tga.c
===================================================================
--- GraphicsMagick-1.3.25.orig/coders/tga.c 2015-10-04 21:35:31.000000000 +0200
+++ GraphicsMagick-1.3.25/coders/tga.c 2018-12-21 11:49:51.214532381 +0100
@@ -952,6 +952,10 @@ static unsigned int WriteTGAImage(const
targa_info.colormap_length=(unsigned short) image->colors;
targa_info.colormap_size=24;
}
+
+ if ((image->columns > 65535) || (image->rows > 65535))
+ ThrowWriterException(CoderError,ImageColumnOrRowSizeIsNotSupported, image);
+
/*
Write TGA header.
*/