CVS update of imagemagick/coders (dcm.c)

Daniel Kobras kobras at alioth.debian.org
Sat Apr 28 14:29:46 UTC 2007


    Date: Saturday, April 28, 2007 @ 14:29:46
  Author: kobras
    Path: /cvsroot/pkg-gmagick/imagemagick/coders

Modified: dcm.c

Add one more fix for an integer overflow from upstream SVN.


-------+
 dcm.c |    2 ++
 1 files changed, 2 insertions(+)


Index: imagemagick/coders/dcm.c
diff -u imagemagick/coders/dcm.c:1.2 imagemagick/coders/dcm.c:1.3
--- imagemagick/coders/dcm.c:1.2	Sat Apr 28 13:53:52 2007
+++ imagemagick/coders/dcm.c	Sat Apr 28 14:29:46 2007
@@ -2905,6 +2905,8 @@
         else
           if ((quantum != 0) && (length != 0))
             {
+              if (length > ((~0UL)/quantum))
+                ThrowReaderException(CorruptImageError,"ImproperImageHeader");
               data=(unsigned char *)
                 AcquireMagickMemory((size_t) quantum*(length+1));
               if (data == (unsigned char *) NULL)



More information about the pkg-gmagick-commit mailing list