From 1d18b1e6ab1aabab94554fc10e24811478346fab Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 15 Aug 2013 20:47:28 +0200 Subject: [PATCH] (imagemagick_compute_animated_image): Fix animated segafault (imagemagick_compute_animated_image): Setting the iterator row to zero is apparently not allowed. --- src/ChangeLog | 2 ++ src/image.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9087f8b12b8..431802eab45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/image.c b/src/image.c index 348f6a8209b..6f92c583554 100644 --- a/src/image.c +++ b/src/image.c @@ -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) -- 2.39.2