Mercurial > libavcodec.hg
changeset 4431:85ac154efd99 libavcodec
Check that js_vlc_bits from the extradata is in a valid range.
author | banan |
---|---|
date | Mon, 29 Jan 2007 10:42:36 +0000 |
parents | 407e7fd9b4f4 |
children | a848b652f0ac |
files | cook.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cook.c Mon Jan 29 10:32:14 2007 +0000 +++ b/cook.c Mon Jan 29 10:42:36 2007 +0000 @@ -1245,6 +1245,10 @@ 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);