CVS update of imagemagick/coders (pict.c)

Luciano Bello luciano-guest at alioth.debian.org
Mon Mar 19 18:30:05 CET 2007


    Date: Monday, March 19, 2007 @ 17:30:05
  Author: luciano-guest
    Path: /cvsroot/pkg-gmagick/imagemagick/coders

Modified: pict.c

Fixing segfault in PICT coder. There are more.


--------+
 pict.c |    4 ++++
 1 files changed, 4 insertions(+)


Index: imagemagick/coders/pict.c
diff -u imagemagick/coders/pict.c:1.2 imagemagick/coders/pict.c:1.3
--- imagemagick/coders/pict.c:1.2	Thu Mar 15 17:29:45 2007
+++ imagemagick/coders/pict.c	Mon Mar 19 17:30:05 2007
@@ -78,6 +78,10 @@
   pixmap.plane_bytes=ReadBlobMSBLong(image); \
   pixmap.table=ReadBlobMSBLong(image); \
   pixmap.reserved=ReadBlobMSBLong(image); \
+  if (pixmap.bits_per_pixel <= 0 || pixmap.bits_per_pixel > 32 || \
+      pixmap.component_count <= 0 || pixmap.component_count > 4 || \
+      pixmap.component_size <= 0) \
+    ThrowReaderException(CorruptImageError,"CorruptImage"); \
 }
 
 #define ReadRectangle(rectangle) \



More information about the pkg-gmagick-commit mailing list