targa: Fix input buffer size check.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-27 00:12:03 +02:00
parent 8f0d9b43be
commit 43fd321252
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ static int decode_frame(AVCodecContext *avctx,
buf += res;
}else{
size_t img_size = s->width * ((s->bpp + 1) >> 3);
CHECK_BUFFER_SIZE(buf, buf_end, img_size, "image data");
CHECK_BUFFER_SIZE(buf, buf_end, img_size * s->height , "image data");
for(y = 0; y < s->height; y++){
memcpy(dst, buf, img_size);