You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
avcodec/vorbisdec: Check codebook float values to be finite
Fixes: Timeout
Fixes: 55116/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-4572159970508800
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cadd7e7a75
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -363,6 +363,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc)
|
|||||||
unsigned codebook_value_bits = get_bits(gb, 4) + 1;
|
unsigned codebook_value_bits = get_bits(gb, 4) + 1;
|
||||||
unsigned codebook_sequence_p = get_bits1(gb);
|
unsigned codebook_sequence_p = get_bits1(gb);
|
||||||
|
|
||||||
|
if (!isfinite(codebook_minimum_value) || !isfinite(codebook_delta_value)) {
|
||||||
|
ret = AVERROR_INVALIDDATA;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n",
|
ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n",
|
||||||
codebook_lookup_values);
|
codebook_lookup_values);
|
||||||
ff_dlog(NULL, " delta %f minmum %f \n",
|
ff_dlog(NULL, " delta %f minmum %f \n",
|
||||||
|
Reference in New Issue
Block a user