mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avcodec/vorbisdec: Check remaining data in vorbis_residue_decode_internal()
Fixes: timeout
Fixes: 66326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-6295291863040000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dc89cf804a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7d3c0fbfba
commit
c9ccd045e1
@ -1451,6 +1451,9 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
|
|||||||
unsigned step = FASTDIV(vr->partition_size << 1, dim << 1);
|
unsigned step = FASTDIV(vr->partition_size << 1, dim << 1);
|
||||||
vorbis_codebook codebook = vc->codebooks[vqbook];
|
vorbis_codebook codebook = vc->codebooks[vqbook];
|
||||||
|
|
||||||
|
if (get_bits_left(gb) <= 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (vr_type == 0) {
|
if (vr_type == 0) {
|
||||||
|
|
||||||
voffs = voffset+j*vlen;
|
voffs = voffset+j*vlen;
|
||||||
|
Loading…
Reference in New Issue
Block a user