Commit 98f7bcb1 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

Check dimensions against 0 too.

39_vorbis_zero_dims.patch from chrome

Originally committed as revision 19976 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 9062cd35
......@@ -244,8 +244,8 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) {
}
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment