diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-10-01 00:00:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-10-08 21:36:08 +0200 |
commit | cedb4736f568a9cc693f81b1f7c33ea2499715ab (patch) | |
tree | d98e3e7436170d9ce272c49841ab6bf9bdc95750 | |
parent | fe6ce28d118d6030984e1ee5c2d92e98514fe3d1 (diff) | |
download | ffmpeg-cedb4736f568a9cc693f81b1f7c33ea2499715ab.tar.gz |
avformat/asfdec_f: Saturate presentation time in marker
Fixes: signed integer overflow: -9223372036315799520 - 3873890816 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5009302746431488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/asfdec_f.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 5405956467..a579c3e894 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -674,7 +674,7 @@ static int asf_read_marker(AVFormatContext *s) avio_rl64(pb); // offset, 8 bytes pres_time = avio_rl64(pb); // presentation time - pres_time -= asf->hdr.preroll * 10000; + pres_time = av_sat_sub64(pres_time, asf->hdr.preroll * 10000); avio_rl16(pb); // entry length avio_rl32(pb); // send time avio_rl32(pb); // flags |