diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2007-01-29 10:42:36 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2007-01-29 10:42:36 +0000 |
commit | 753c9d3260004042525a4e84bc61251af58e0f2b (patch) | |
tree | 770d09efd01403ac7903f1383a183d581268ee1e /libavcodec/cook.c | |
parent | 862be28b192185d094d96bbc24d9be43e2b22106 (diff) | |
download | ffmpeg-753c9d3260004042525a4e84bc61251af58e0f2b.tar.gz |
Check that js_vlc_bits from the extradata is in a valid range.
Originally committed as revision 7756 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r-- | libavcodec/cook.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 8fe17bd66f..ef18c6cf76 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1245,6 +1245,10 @@ static int cook_decode_init(AVCodecContext *avctx) av_log(avctx,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel); return -1; } + if ((q->js_vlc_bits > 6) || (q->js_vlc_bits < 0)) { + av_log(avctx,AV_LOG_ERROR,"q->js_vlc_bits = %d, only >= 0 and <= 6 allowed!\n",q->js_vlc_bits); + return -1; + } #ifdef COOKDEBUG dump_cook_context(q); |