mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/cafdec: dont seek beyond 64bit
Fixes: signed integer overflow: 64 + 9223372036854775807 cannot be represented in type 'long long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064
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 d973fcbcc2
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
dccb2d95ec
commit
2eb0e9d168
@ -222,7 +222,7 @@ static int read_pakt_chunk(AVFormatContext *s, int64_t size)
|
||||
}
|
||||
}
|
||||
|
||||
if (avio_tell(pb) - ccount > size) {
|
||||
if (avio_tell(pb) - ccount > size || size > INT64_MAX - ccount) {
|
||||
av_log(s, AV_LOG_ERROR, "error reading packet table\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user