1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/id3v2: read_uslt() check for the amount read

Fixes: timeout
Fixes: 66783/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5356884892647424

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 c0f4abe2aa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-03-20 03:51:05 +01:00
parent 7d9656e858
commit 7fa625df70
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -366,7 +366,7 @@ static void read_uslt(AVFormatContext *s, AVIOContext *pb, int taglen,
int encoding;
int ok = 0;
if (taglen < 1)
if (taglen < 4)
goto error;
encoding = avio_r8(pb);