mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-20 07:48:15 +02:00
avcodec/sonic: Check for overread
Fixes: Timeout (too long -> 1.3 sec) Fixes: 24358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5107284099989504 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 eeabdef1bf96cdecf80aeb8d0478d008457b048c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2659b0f180
commit
d09bc9fe7f
@ -1031,6 +1031,9 @@ static int sonic_decode_frame(AVCodecContext *avctx,
|
|||||||
{
|
{
|
||||||
int x = ch;
|
int x = ch;
|
||||||
|
|
||||||
|
if (c.overread > MAX_OVERREAD)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
predictor_init_state(s->predictor_k, s->predictor_state[ch], s->num_taps);
|
predictor_init_state(s->predictor_k, s->predictor_state[ch], s->num_taps);
|
||||||
|
|
||||||
intlist_read(&c, state, s->coded_samples[ch], s->block_align, 1);
|
intlist_read(&c, state, s->coded_samples[ch], s->block_align, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user