Check dimensions against 0 too.

39_vorbis_zero_dims.patch from chrome

Originally committed as revision 19976 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Michael Niedermayer 16 years ago
parent 9062cd3544
commit 98f7bcb119
  1. 4
      libavcodec/vorbis_dec.c

@ -244,8 +244,8 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) {
} }
codebook_setup->dimensions=get_bits(gb, 16); codebook_setup->dimensions=get_bits(gb, 16);
if (codebook_setup->dimensions>16) { if (codebook_setup->dimensions>16||codebook_setup->dimensions==0) {
av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is too large (%d). \n", cb, codebook_setup->dimensions); av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is invalid (%d). \n", cb, codebook_setup->dimensions);
goto error; goto error;
} }
entries=get_bits(gb, 24); entries=get_bits(gb, 24);

Loading…
Cancel
Save