mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-19 22:01:00 +00:00
avformat/sbgdec: Check for overflow in parse_timestamp()
Fixes: signed integer overflow: 33986707200000000 + 9195561788997000192 cannot be represented in type 'long' Fixes: 23790/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554232198266880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
80286671c5
commit
b6663adaae
@ -474,6 +474,8 @@ static int parse_timestamp(struct sbg_parser *p,
|
||||
while (lex_char(p, '+')) {
|
||||
if (!lex_time(p, &dt))
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (av_sat_add64(rel, dt) - dt != rel)
|
||||
return AVERROR_INVALIDDATA;
|
||||
rel += dt;
|
||||
r = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user