aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/asvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-20 12:42:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-20 12:49:15 +0200
commit1e9a850df9b2d4824155cfa2513998875dc4823b (patch)
tree003d5c4fd0ab78a3df1fe0c4c1016e0ebaa22b61 /libavcodec/asvdec.c
parent35a8387b402692933620412d41e2939aca4f6935 (diff)
parentf50803354c6acb4575379d7c54ca48ec5d36dd61 (diff)
downloadffmpeg-1e9a850df9b2d4824155cfa2513998875dc4823b.tar.gz
Merge commit 'f50803354c6acb4575379d7c54ca48ec5d36dd61'
* commit 'f50803354c6acb4575379d7c54ca48ec5d36dd61': asvdec: Verify the amount of extradata See: 605f2b6b004eee4dc57832257169ff8eaa562fb7 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/asvdec.c')
-rw-r--r--libavcodec/asvdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index eb29e084e0..4cd1fd27bc 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -271,6 +271,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
const int scale = avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
int i;
+ if (avctx->extradata_size < 1) {
+ av_log(avctx, AV_LOG_ERROR, "No extradata provided\n");
+ return AVERROR_INVALIDDATA;
+ }
+
ff_asv_common_init(avctx);
init_vlcs(a);
ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_asv_scantab);