[FFmpeg-cvslog] avformat/asfdec_f: Saturate presentation time in marker
Michael Niedermayer
git at videolan.org
Mon Oct 30 02:11:38 EET 2023
ffmpeg | branch: release/5.1 | Michael Niedermayer <michael at niedermayer.cc> | Sun Oct 1 00:00:28 2023 +0200| [a563efcfda67b56cc50d4c2f28b7e44fcafa464b] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit cedb4736f568a9cc693f81b1f7c33ea2499715ab)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a563efcfda67b56cc50d4c2f28b7e44fcafa464b
---
libavformat/asfdec_f.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index bdbd4271c8..aa7aaa6ab6 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -670,7 +670,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
More information about the ffmpeg-cvslog
mailing list