From: Lars Magne Ingebrigtsen Date: Sun, 1 Dec 2013 14:34:05 +0000 (+0100) Subject: Fix duckduckgo imagemagick crash X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~607 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5f9aee6fdd89fe983b022598a80d6314f98321bc;p=emacs.git Fix duckduckgo imagemagick crash * image.c (imagemagick_compute_animated_image): Don't crash if we have an animation with different-sized images. Fixes: debbugs:15313 --- diff --git a/src/ChangeLog b/src/ChangeLog index 454413c85c0..36c379c56dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-12-01 Lars Magne Ingebrigtsen + + * image.c (imagemagick_compute_animated_image): Don't crash if we + have an animation with different-sized images (bug#15313). + 2013-11-30 Martin Rudalics Remove some unused items introduced during pixelwise change. diff --git a/src/image.c b/src/image.c index 167ee2da303..91038dd480a 100644 --- a/src/image.c +++ b/src/image.c @@ -8093,7 +8093,7 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino) { /* Sanity check. This shouldn't happen, but apparently also does in some pictures. */ - if (x + source_left > dest_width) + if (x + source_left > dest_width - 1) break; /* Normally we only copy over non-transparent pixels, but if the disposal method is "Background", then we