]> git.eshelyaron.com Git - emacs.git/commitdiff
(imagemagick_compute_animated_image): Fix animated segafault
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 15 Aug 2013 18:47:28 +0000 (20:47 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 15 Aug 2013 18:47:28 +0000 (20:47 +0200)
(imagemagick_compute_animated_image): Setting the iterator row to
zero is apparently not allowed.

src/ChangeLog
src/image.c

index 9087f8b12b8bc6bf61b22cffc0e2d890b6483b9f..431802eab45455ef61a44f42e4e19dd47495e07d 100644 (file)
@@ -2,6 +2,8 @@
 
        * image.c (imagemagick_compute_animated_image): Animate correctly
        when sub-images are smaller than the main image.
+       (imagemagick_compute_animated_image): Setting the iterator row to
+       zero is apparently not allowed.
 
 2013-08-15  Jan Djärv  <jan.h.d@swipnet.se>
 
index 348f6a8209b81260a692560ac8715d378a6333ce..6f92c583554e4dc1dbe1cf45bf76a03e83d9fb3b 100644 (file)
@@ -7945,7 +7945,8 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino)
 
       /* The sub-image may not start at origo, so move the destination
         iterator to where the sub-image should start. */
-      PixelSetIteratorRow (dest_iterator, source_top);
+      if (source_top > 0)
+       PixelSetIteratorRow (dest_iterator, source_top);
 
       while ((source = PixelGetNextIteratorRow (source_iterator, &source_width))
             != NULL)