PR #22435 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22435
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22435.patch

Fixes: integer overflow
Fixes: 
490241718/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-4902512932225024

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>


>From d6abc967571d6295d94e1093b4da43952c1c43b4 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sat, 7 Mar 2026 13:48:49 +0100
Subject: [PATCH] avformat/dhav: Fix handling or slightly larger files

Fixes: integer overflow
Fixes: 
490241718/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-4902512932225024

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/dhav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dhav.c b/libavformat/dhav.c
index 84a203ef6f..a7a987fc5b 100644
--- a/libavformat/dhav.c
+++ b/libavformat/dhav.c
@@ -252,7 +252,7 @@ static int64_t get_duration(AVFormatContext *s)
     int64_t size = avio_size(s->pb);
     int64_t ret = 0;
 
-    if (start_pos + 20 > size)
+    if (start_pos > INT64_MAX - 20 || start_pos + 20 > size)
         return 0;
 
     avio_skip(s->pb, 16);
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to