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

Fixes: signed integer overflow: 50000 * 50000 cannot be represented in type 
'int'
Reachable through API

Found during review with Forgejo Fairy



>From 164001b84cd235e0fcb35deda97e6eaa9d955872 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Fri, 25 Sep 2026 02:12:23 +0200
Subject: [PATCH] swscale/utils: compare the cascade image sizes in 64 bits

Fixes: signed integer overflow: 50000 * 50000 cannot be represented in type 
'int'
Reachable through API

Found during review with Forgejo Fairy
---
 libswscale/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 55ac6c9efb..b1b5649256 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -938,7 +938,7 @@ int sws_setColorspaceDetails(SwsContext *sws, const int 
inv_table[4],
                 }
             }
 
-            if (srcW*srcH > dstW*dstH) {
+            if (srcW*(int64_t)srcH > dstW*(int64_t)dstH) {
                 tmp_width  = dstW;
                 tmp_height = dstH;
             } else {
-- 
2.52.0

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

Reply via email to