When build with zero configuration, display always crashed.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
sxzzsf
Posts: 1
Joined: 2013-04-18T02:26:22-07:00
Authentication code: 6789

When build with zero configuration, display always crashed.

Post by sxzzsf » 2013-04-18T02:35:00-07:00

After debugging, I found that the memory can not freed directly via free(), here is the patch:

Code: Select all

--- ImageMagick-6.8.4-10/magick/xwindow.c.orig  2013-04-18 17:17:46.954436795 +0800
+++ ImageMagick-6.8.4-10/magick/xwindow.c       2013-04-18 17:19:50.580110884 +0800
@@ -5659,7 +5659,7 @@
         }
 #endif
       if (window->ximage->data != (char *) NULL)
-        free(window->ximage->data);
+        RelinquishMagickMemory(window->ximage->data);
       window->ximage->data=(char *) NULL;
       XDestroyImage(window->ximage);
       window->ximage=(XImage *) NULL;
@@ -5713,7 +5713,7 @@
         Free matte image.
       */
       if (window->matte_image->data != (char *) NULL)
-        free(window->matte_image->data);
+        RelinquishMagickMemory(window->matte_image->data);
       window->matte_image->data=(char *) NULL;
       XDestroyImage(window->matte_image);
       window->matte_image=(XImage *) NULL;

User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: When build with zero configuration, display always crash

Post by magick » 2013-04-18T03:37:42-07:00

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.5-0 Beta available by sometime tomorrow. Thanks.

Post Reply