The encoder uses max 128 taps, which is quiet a lot already If work is done to improve sonic, it will be more radical than changing the taps Fixes: Timeout Fixes: 402539974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-6122944271286272
Unified · Split
| @@ -924,6 +924,9 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) · 923 unmodified lines | ||
| 924 | 924 | if (get_bits1(&gb)) // XXX FIXME |
| 925 | 925 | av_log(avctx, AV_LOG_INFO, "Custom quant table\n"); |
| 926 | 926 | |
| 927 | + if (s->num_taps > 128) | |
| 928 | + return AVERROR_INVALIDDATA; | |
| 929 | + | |
| 927 | 930 | s->block_align = 2048LL*s->samplerate/(44100*s->downsampling); |
| 928 | 931 | s->frame_size = s->channels*s->block_align*s->downsampling; |
| 929 | 932 | // avctx->frame_size = s->block_align; |