Commit 68cb8f3c authored by michael's avatar michael

Check dimensions against 0 too.

39_vorbis_zero_dims.patch from chrome


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19976 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 22364a78
......@@ -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