diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-19 15:14:56 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-19 22:43:55 +0300 |
commit | f50803354c6acb4575379d7c54ca48ec5d36dd61 (patch) | |
tree | f1a1bccd1ab03bd5b906bbbaf5a60728c1a30ec4 /libavcodec/asvdec.c | |
parent | 72fe16a13e3ebd5396ac173bf84c8b20085c16d5 (diff) | |
download | ffmpeg-f50803354c6acb4575379d7c54ca48ec5d36dd61.tar.gz |
asvdec: Verify the amount of extradata
The init function reads one byte of extradata.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/asvdec.c')
-rw-r--r-- | libavcodec/asvdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c index 9f74abbbec..9ba2755717 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -274,6 +274,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); |