Mercurial > libavcodec.hg
changeset 10232:1792a26c0bbb libavcodec
Check dimensions against 0 too.
39_vorbis_zero_dims.patch from chrome
author | michael |
---|---|
date | Wed, 23 Sep 2009 08:35:29 +0000 |
parents | e99054a89bfe |
children | f397ad0fa67d |
files | vorbis_dec.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/vorbis_dec.c Wed Sep 23 07:46:51 2009 +0000 +++ b/vorbis_dec.c Wed Sep 23 08:35:29 2009 +0000 @@ -244,8 +244,8 @@ } codebook_setup->dimensions=get_bits(gb, 16); - if (codebook_setup->dimensions>16) { - av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is too large (%d). \n", cb, codebook_setup->dimensions); + if (codebook_setup->dimensions>16||codebook_setup->dimensions==0) { + av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is invalid (%d). \n", cb, codebook_setup->dimensions); goto error; } entries=get_bits(gb, 24);