[FFmpeg-cvslog] gifdec: fix invalid write in gif_copy_img_rect

Paul B Mahol git at videolan.org
Thu Dec 20 19:00:00 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Dec 20 17:56:52 2012 +0000| [9321e93502810e4a3fcaf87bac156dba2fe3b477] | committer: Paul B Mahol

gifdec: fix invalid write in gif_copy_img_rect

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9321e93502810e4a3fcaf87bac156dba2fe3b477
---

 libavcodec/gifdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 59574e9..9a3aef0 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -118,7 +118,7 @@ static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst,
     const uint32_t *src_px, *src_pr,
                    *src_py = src + y_start,
                    *dst_py = dst + y_start;
-    const uint32_t *src_pb = src_py + (t + h) * linesize;
+    const uint32_t *src_pb = src_py + t * linesize;
     uint32_t *dst_px;
 
     for (; src_py < src_pb; src_py += linesize, dst_py += linesize) {



More information about the ffmpeg-cvslog mailing list