emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111937: Fix misuse of ImageMagick th


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111937: Fix misuse of ImageMagick that caused core dump.
Date: Mon, 04 Mar 2013 09:35:29 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111937
fixes bug: http://debbugs.gnu.org/13846
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2013-03-04 09:35:29 -0800
message:
  Fix misuse of ImageMagick that caused core dump.
  
  * image.c (imagemagick_load_image): Calculate height and width
  after flattening the image, not before.
modified:
  src/ChangeLog
  src/image.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-03-04 07:41:01 +0000
+++ b/src/ChangeLog     2013-03-04 17:35:29 +0000
@@ -1,3 +1,9 @@
+2013-03-04  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.

=== modified file 'src/image.c'
--- a/src/image.c       2013-01-02 16:13:04 +0000
+++ b/src/image.c       2013-03-04 17:35:29 +0000
@@ -7792,11 +7792,6 @@
         }
     }
 
-  /* 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 @@
     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)))
     {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]