Commit 84ac6f9d authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix misuse of ImageMagick that caused core dump.

* image.c (imagemagick_load_image): Calculate height and width
after flattening the image, not before.

Fixes: debbugs:13846
parent 8bd104b3
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.
......
......@@ -7792,11 +7792,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
}
}
/* 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
......@@ -7813,6 +7808,11 @@ imagemagick_load_image (struct frame *f, struct image *img,
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)))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment