[FFmpeg-cvslog] targa: use checked bytestream read

Michael Niedermayer git at videolan.org
Thu Jan 10 05:55:55 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jan 10 04:37:45 2013 +0100| [7cb46b519103ed62edbb992abfe564971043e5d9] | committer: Michael Niedermayer

targa: use checked bytestream read

Fix out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 6bb05a9..18ad21d 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -267,7 +267,7 @@ static int decode_frame(AVCodecContext *avctx,
             line = dst;
             y = 0;
             do {
-                bytestream2_get_bufferu(&s->gb, line, img_size);
+                bytestream2_get_buffer(&s->gb, line, img_size);
                 line = advance_line(dst, line, stride, &y, h, interleave);
             } while (line);
         }



More information about the ffmpeg-cvslog mailing list