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:59:48 +0100 |
commit | e5cc73e0a589e8f12e40e09d2453d86a297a834e (patch) | |
tree | 89e5b775ae75a677aa82db6fbe6e4bb127598805 /libavcodec | |
parent | 3429714f3d046f4e2235848a60b6f63bd084e01f (diff) | |
download | ffmpeg-e5cc73e0a589e8f12e40e09d2453d86a297a834e.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.c | 4 |
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; |