This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/4.4
in repository ffmpeg.

commit 241530f9be1efdc90b2db030256879a75ab4d56a
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Mar 3 20:56:31 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Tue May 5 18:55:06 2026 +0200

    swscale/output: Fix integer overflow in alpha in yuv2rgba64_1_c_template()
    
    Fixes: signed integer overflow: -1548257 * 2048 cannot be represented in 
type 'int'
    Fixes: #21592
    
    Found-by: HAORAN FANG
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 1e63151355342228584e30dab2c53a2cb0d19b42)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libswscale/output.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index d7bd0b941f..34530b6365 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1147,7 +1147,7 @@ yuv2rgba64_1_c_template(SwsContext *c, const int32_t 
*buf0,
 {
     const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0];
     int i;
-    int A1 = 0xffff<<14, A2= 0xffff<<14;
+    SUINT A1 = 0xffff<<14, A2= 0xffff<<14;
 
     if (uvalpha < 2048) {
         for (i = 0; i < ((dstW + 1) >> 1); i++) {
@@ -1165,8 +1165,8 @@ yuv2rgba64_1_c_template(SwsContext *c, const int32_t 
*buf0,
             Y2 += (1 << 13) - (1 << 29);
 
             if (hasAlpha) {
-                A1 = abuf0[i * 2    ] * (1 << 11);
-                A2 = abuf0[i * 2 + 1] * (1 << 11);
+                A1 = abuf0[i * 2    ] * (SUINT)(1 << 11);
+                A2 = abuf0[i * 2 + 1] * (SUINT)(1 << 11);
 
                 A1 += 1 << 13;
                 A2 += 1 << 13;

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

Reply via email to