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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0ab097fb344ab55b207d0431fff8aa32ecdef70f
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun May 31 03:07:26 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Fri Jun 5 01:15:22 2026 +0000

    swscale/output: avoid signed overflow in yuv2rgba64_1 alpha
    
    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 003bff63a1..cea7fb1185 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1320,7 +1320,7 @@ yuv2rgba64_1_c_template(SwsInternal *c, const int32_t 
*buf0,
         }
     } else {
         const int32_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1];
-        int A1 = 0xffff<<14, A2 = 0xffff<<14;
+        SUINT A1 = 0xffff<<14, A2 = 0xffff<<14;
         unsigned uvalpha1 = 4096 - uvalpha;
         av_assert2(uvalpha <= 4096U);
 
@@ -1339,8 +1339,8 @@ yuv2rgba64_1_c_template(SwsInternal *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