Browse Source

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>
tags/n1.2
Michael Niedermayer 13 years ago
parent
commit
7cb46b5191
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/targa.c

+ 1
- 1
libavcodec/targa.c View File

@@ -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);
}


Loading…
Cancel
Save