diff options
author | Pierre Joye <pierre.php@gmail.com> | 2021-08-25 12:52:45 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2021-08-25 12:52:45 +0700 |
commit | 5771e976bd973f80d62329df15eb4102d97587c3 (patch) | |
tree | f64a62a9c027e3105446466570f214255a1408f3 /src/gd_gif_out.c | |
parent | a24e96f01989bf9ca05a08d33862a08d6f4c4ed6 (diff) | |
download | libgd-5771e976bd973f80d62329df15eb4102d97587c3.tar.gz |
Fix #415, Assuming TopOfs and LeftOfs zero, we can safely skip any (x,y) out of the previous image bounds
Diffstat (limited to 'src/gd_gif_out.c')
-rw-r--r-- | src/gd_gif_out.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gd_gif_out.c b/src/gd_gif_out.c index f1d73fd..c1e54fa 100644 --- a/src/gd_gif_out.c +++ b/src/gd_gif_out.c @@ -745,6 +745,8 @@ break_top: /* Then the bottom row */ for (y = tim->sy - 1; y > min_y; --y) { for (x = 0; x < tim->sx; ++x) { + if (!gdImageBoundsSafe(prev_tim, x,y)) + continue; if (!comparewithmap (prev_tim, tim, prev_tim->pixels[y][x], |