diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-19 15:14:56 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-07 09:43:57 +0100 |
commit | 036136fa89ac44fd89c7f4730d3039f0b3b92cfd (patch) | |
tree | 3add729cc0f76e17e940d86abf7d9e1b2ab2370d /libavcodec/asv1.c | |
parent | 75dabbff8b15700c20e42f79a23fd4338a54e71d (diff) | |
download | ffmpeg-036136fa89ac44fd89c7f4730d3039f0b3b92cfd.tar.gz |
asv1: 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>
(cherry picked from commit f50803354c6acb4575379d7c54ca48ec5d36dd61)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/asv1.c')
-rw-r--r-- | libavcodec/asv1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 8db23c07ef..cdddfa58af 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -535,6 +535,11 @@ static av_cold int decode_init(AVCodecContext *avctx){ int i; const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; + if (avctx->extradata_size < 1) { + av_log(avctx, AV_LOG_ERROR, "No extradata provided\n"); + return AVERROR_INVALIDDATA; + } + common_init(avctx); init_vlcs(a); ff_init_scantable(a->dsp.idct_permutation, &a->scantable, scantab); |