diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-28 18:33:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-28 18:33:29 +0100 |
commit | 11ca3416f92744f376c08e5f31bcbe5d9b44acb2 (patch) | |
tree | 8aba823232c2e2156ce212fe64c35a6600c15f33 /libavcodec/v410dec.c | |
parent | 190a0998c353879c8f79f47678752dbb8fa62bb2 (diff) | |
download | ffmpeg-11ca3416f92744f376c08e5f31bcbe5d9b44acb2.tar.gz |
v410dec: Check for sufficient input data.
Fixes crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/v410dec.c')
-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 d746dd0921..dfd1273012 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) { |