gifdec: fix invalid write in gif_copy_img_rect
authorPaul B Mahol <onemda@gmail.com>
Thu, 20 Dec 2012 17:56:52 +0000 (17:56 +0000)
committerPaul B Mahol <onemda@gmail.com>
Thu, 20 Dec 2012 17:56:52 +0000 (17:56 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/gifdec.c

index 59574e9..9a3aef0 100644 (file)
@@ -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) {