diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-28 15:04:44 -0500 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-12-28 12:47:36 -0800 |
commit | 8f5216905f88510c9a74cd91a424902aa989b9a1 (patch) | |
tree | e801e016a18d0822e12670b9fd86b46d9f4f357e | |
parent | 733b23c2e44cb67b90e04f337eb4a407d46f70d1 (diff) | |
download | ffmpeg-8f5216905f88510c9a74cd91a424902aa989b9a1.tar.gz |
v410dec: Check for sufficient input data. Fixes crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-rw-r--r-- | libavcodec/v410dec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c index 71cbe0b355..54c9595826 100644 --- a/libavcodec/v410dec.c +++ b/libavcodec/v410dec.c @@ -55,6 +55,11 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data, if (pic->data[0]) avctx->release_buffer(avctx, pic); + if (avpkt->size < 4 * avctx->height * avctx->width) { + av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n"); + return AVERROR(EINVAL); + } + pic->reference = 0; if (avctx->get_buffer(avctx, pic) < 0) { |