History

avcodec/sonic: Check num_taps

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

Michael Niedermayer committed 1 year ago

Commit fd0a7921 parent d28bec81 file · +3 −0Browse files

Unified · Split

libavcodec/sonic.c+3−0
@@ -924,6 +924,9 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) · 923 unmodified lines
924924 if (get_bits1(&gb)) // XXX FIXME
925925 av_log(avctx, AV_LOG_INFO, "Custom quant table\n");
926926
927+ if (s->num_taps > 128)
928+ return AVERROR_INVALIDDATA;
929+
927930 s->block_align = 2048LL*s->samplerate/(44100*s->downsampling);
928931 s->frame_size = s->channels*s->block_align*s->downsampling;
929932 // avctx->frame_size = s->block_align;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t