[FFmpeg-cvslog] gifdec: gif_copy_img_rect: Fix end pointer

Michael Niedermayer git at videolan.org
Tue Feb 5 17:01:16 CET 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Jan 24 23:11:10 2013 +0100| [9547034f9120187e23ad76424dd4d70247e62212] | committer: Michael Niedermayer

gifdec: gif_copy_img_rect: Fix end pointer

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c10350358da58600884292c08a8690289b81de29)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index e5e84ae..a916dfe 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 * linesize;
+    const uint32_t *src_pb = src_py + h * linesize;
     uint32_t *dst_px;
 
     for (; src_py < src_pb; src_py += linesize, dst_py += linesize) {



More information about the ffmpeg-cvslog mailing list