mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/rmdec: check tag_size
Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6598073725353984
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 2cb7ee8a36
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
34e46dc429
commit
82bd617683
@ -568,6 +568,8 @@ static int rm_read_header(AVFormatContext *s)
|
||||
}
|
||||
|
||||
tag_size = avio_rb32(pb);
|
||||
if (tag_size < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
avio_skip(pb, tag_size - 8);
|
||||
|
||||
for(;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user