Re: [FFmpeg-devel] [PATCH 01/10] avformat/concatdec: Check user_duration sum

2024-03-26 Thread Michael Niedermayer
On Tue, Mar 26, 2024 at 01:11:42AM +0100, Michael Niedermayer wrote:
> Fixes: 
> 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6434245599690752
> Fixes: signed integer overflow: 922337202677300 + 2233700 cannot be 
> represented in type 'long'
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/concatdec.c | 2 ++
>  1 file changed, 2 insertions(+)

if there are no objections i will apply this patchset before making the 7.0 
branch

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH 01/10] avformat/concatdec: Check user_duration sum

2024-03-25 Thread Michael Niedermayer
Fixes: 
62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6434245599690752
Fixes: signed integer overflow: 922337202677300 + 2233700 cannot be 
represented in type 'long'

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavformat/concatdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index ac541a592fa..f1401e43530 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -679,6 +679,8 @@ static int concat_read_header(AVFormatContext *avf)
 cat->files[i].user_duration = cat->files[i].outpoint - 
cat->files[i].inpoint;
 }
 cat->files[i].duration = cat->files[i].user_duration;
+if (time + (uint64_t)cat->files[i].user_duration > INT64_MAX)
+return AVERROR_INVALIDDATA;
 time += cat->files[i].user_duration;
 }
 if (i == cat->nb_files) {
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".