From 5f9aee6fdd89fe983b022598a80d6314f98321bc Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 1 Dec 2013 15:34:05 +0100 Subject: [PATCH] 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 --- src/ChangeLog | 5 +++++ src/image.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2