summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2021-08-25 17:48:03 +0700
committerPierre Joye <pierre.php@gmail.com>2021-08-25 17:48:03 +0700
commit4cd5542152afa8409e688297164a08bf03440197 (patch)
treea518e8f47f2e3c4cb1c86ab04435d5fd91c67aac /src
parent5771e976bd973f80d62329df15eb4102d97587c3 (diff)
downloadlibgd-4cd5542152afa8409e688297164a08bf03440197.tar.gz
fix #415, the same is needed in the other section, add testbug/415
Diffstat (limited to 'src')
-rw-r--r--src/gd_gif_out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gd_gif_out.c b/src/gd_gif_out.c
index c1e54fa..526a221 100644
--- a/src/gd_gif_out.c
+++ b/src/gd_gif_out.c
@@ -768,6 +768,8 @@ break_bot:
/* left side */
for (x = 0; x < min_x; ++x) {
for (y = min_y; y <= max_y; ++y) {
+ if (!gdImageBoundsSafe(prev_tim, x,y))
+ continue;
if (!comparewithmap
(prev_tim, tim,
prev_tim->pixels[y][x],
@@ -783,6 +785,8 @@ break_left:
/* right side */
for (x = tim->sx - 1; x > max_x; --x) {
for (y = min_y; y <= max_y; ++y) {
+ if (!gdImageBoundsSafe(prev_tim, x,y))
+ continue;
if (!comparewithmap
(prev_tim, tim,
prev_tim->pixels[y][x],