mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/samidec: Sanity check pts
Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long' Fixes: 29743/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-5499256859394048 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
2a2082a41b
commit
2014b01352
@ -95,6 +95,11 @@ static int sami_read_header(AVFormatContext *s)
|
||||
const char *p = ff_smil_get_attr_ptr(buf.str, "Start");
|
||||
sub->pos = pos;
|
||||
sub->pts = p ? strtol(p, NULL, 10) : 0;
|
||||
if (sub->pts <= INT64_MIN/2 || sub->pts >= INT64_MAX/2) {
|
||||
res = AVERROR_PATCHWELCOME;
|
||||
goto end;
|
||||
}
|
||||
|
||||
sub->duration = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user