mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
avformat/id3v2: Check against max compression ratio before allocation
Fixes: Timeout (>10sec -> 12ms) Fixes: 27612/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_S24BE_fuzzer-6605893000757248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7d7ae68972
commit
c48110a4a4
@ -995,6 +995,8 @@ static void id3v2_parse(AVIOContext *pb, AVDictionary **metadata,
|
||||
|
||||
if (tlen <= 0)
|
||||
goto seek;
|
||||
if (dlen / 32768 > tlen)
|
||||
goto seek;
|
||||
|
||||
av_fast_malloc(&uncompressed_buffer, &uncompressed_buffer_size, dlen);
|
||||
if (!uncompressed_buffer) {
|
||||
|
Loading…
Reference in New Issue
Block a user