Crash when MagickNewImage params are incorrect

Post any defects you find in the released or beta versions of the ImageMagick software here. The ImageMagick maintainers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the ImageMagick version and operating system you are using.

Crash when MagickNewImage params are incorrect

Postby mkoppanen » 2008-12-29T07:02:40+00:00

Code: Select all
#include <stdlib.h>
#include <wand/MagickWand.h>


int main() {

        MagickWand *wand;
        PixelWand *color;

        MagickWandGenesis();

        wand = NewMagickWand();
        color = NewPixelWand();


        PixelSetColor(color, "white");


        MagickNewImage(wand, 0, 75, color);


        MagickWandTerminus();
        return 0;
}


Here is a backtrace:

Code: Select all
(gdb) run
Starting program: /home/mikko/a.out
[Thread debugging using libthread_db enabled]
[New Thread -1215785280 (LWP 12767)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215785280 (LWP 12767)]
MagickNewImage (wand=0x804cec8, width=0, height=75, background=0x804a2c0) at wand/magick-image.c:6461
6461      if (images->exception.severity != UndefinedException)
(gdb) bt
#0  MagickNewImage (wand=0x804cec8, width=0, height=75, background=0x804a2c0) at wand/magick-image.c:6461
#1  0x080485cf in main ()


Tested with 6.4.5, might be fixed in current.

Thanks!
mkoppanen
 
Posts: 274
Joined: 2007-06-09T07:06:32+00:00

Re: Crash when MagickNewImage params are incorrect

Postby magick » 2008-12-29T07:24:03+00:00

We can reproduce the problem you posted and have a patch in ImageMagick 6.4.8-3 Beta available sometime tomorrow. Thanks.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00


Return to Bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests