aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-02-16 17:23:34 +0100
committerClément Bœsch <clement@stupeflix.com>2015-02-16 18:20:08 +0100
commitd5b20daeb0e311caa62a899d41c8823c605d117a (patch)
tree5996d3a23a5cddd516e8043da1599249b31305f6 /libavcodec
parent86a01362c0e46d155fbfc1ef19f5ba17af3ee69d (diff)
downloadffmpeg-d5b20daeb0e311caa62a899d41c8823c605d117a.tar.gz
avcodec/gif: fix off by one in column offsetting finding
(cherry picked from commit f9240ec01abb097263fe578d2b6fb076bb7b9263)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/gif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 27d054e512..def1b83e9d 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -105,7 +105,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
/* skip common columns */
while (x_start < x_end) {
int same_column = 1;
- for (y = y_start; y < y_end; y++) {
+ for (y = y_start; y <= y_end; y++) {
if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) {
same_column = 0;
break;
@@ -117,7 +117,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
}
while (x_end > x_start) {
int same_column = 1;
- for (y = y_start; y < y_end; y++) {
+ for (y = y_start; y <= y_end; y++) {
if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) {
same_column = 0;
break;