Browse code

targa: use checked bytestream read

Fix out of array read

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

Michael Niedermayer authored on 2013/01/10 12:37:45
Showing 1 changed files
... ...
@@ -267,7 +267,7 @@ static int decode_frame(AVCodecContext *avctx,
267 267
             line = dst;
268 268
             y = 0;
269 269
             do {
270
-                bytestream2_get_bufferu(&s->gb, line, img_size);
270
+                bytestream2_get_buffer(&s->gb, line, img_size);
271 271
                 line = advance_line(dst, line, stride, &y, h, interleave);
272 272
             } while (line);
273 273
         }