diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-27 00:12:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-27 00:45:32 +0200 |
commit | 43fd3212521e3a44b99a6b1ef9bf9bcdddd086e8 (patch) | |
tree | e8cdf53df82c56a404329360f5151249d4a0af01 /libavcodec | |
parent | 8f0d9b43bea95fc16e334bbcbf0fa1cb5dd2a17c (diff) | |
download | ffmpeg-43fd3212521e3a44b99a6b1ef9bf9bcdddd086e8.tar.gz |
targa: Fix input buffer size check.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/targa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 5ddd21bfef..55841956ad 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -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); |