+2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix misuse of ImageMagick that caused core dump (Bug#13846).
+ * image.c (imagemagick_load_image): Calculate height and width
+ after flattening the image, not before.
+
2013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
* font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
}
}
- /* Finally we are done manipulating the image. Figure out the
- resulting width/height and transfer ownership to Emacs. */
- height = MagickGetImageHeight (image_wand);
- width = MagickGetImageWidth (image_wand);
-
/* Set the canvas background color to the frame or specified
background, and flatten the image. Note: as of ImageMagick
6.6.0, SVG image transparency is not handled properly
image_wand = new_wand;
}
+ /* Finally we are done manipulating the image. Figure out the
+ resulting width/height and transfer ownership to Emacs. */
+ height = MagickGetImageHeight (image_wand);
+ width = MagickGetImageWidth (image_wand);
+
if (! (width <= INT_MAX && height <= INT_MAX
&& check_image_size (f, width, height)))
{