diff options
author | Clément Bœsch <clement@stupeflix.com> | 2015-02-16 17:23:34 +0100 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2015-02-16 17:47:35 +0100 |
commit | f9240ec01abb097263fe578d2b6fb076bb7b9263 (patch) | |
tree | b6e536fc40cf27ecdd0668c826656b411bbee0f5 /libavcodec | |
parent | e40e446efdd024ee58594dbd21a45ce9e39462e3 (diff) | |
download | ffmpeg-f9240ec01abb097263fe578d2b6fb076bb7b9263.tar.gz |
avcodec/gif: fix off by one in column offsetting finding
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/gif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c index db2cee9412..cf5d438a72 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -108,7 +108,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; @@ -120,7 +120,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; |