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

Git pushed a commit to branch master
in repository ffmpeg.

commit ad84fc9b7df2910ea38f91b4a84872c52e006390
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun May 31 01:04:59 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Fri Jun 5 01:15:22 2026 +0000

    swscale/output: avoid signed overflow in yuv2rgba64_full_1 alpha
    
    Fixes: 
493055112/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5823995319746560
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libswscale/output.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 396380ac72..003bff63a1 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1499,7 +1499,7 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const 
int32_t *buf0,
 {
     const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0];
     int i;
-    int A = 0xffff<<14;
+    SUINT A = 0xffff<<14;
 
     if (uvalpha == 0) {
         for (i = 0; i < dstW; i++) {
@@ -1513,7 +1513,7 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const 
int32_t *buf0,
             Y += (1 << 13) - (1 << 29);
 
             if (hasAlpha) {
-                A = abuf0[i] * (1 << 11);
+                A = abuf0[i] * (SUINT)(1 << 11);
 
                 A += 1 << 13;
             }
@@ -1535,7 +1535,7 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const 
int32_t *buf0,
     } else {
         const int32_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1];
         unsigned uvalpha1 = 4096 - uvalpha;
-        int A = 0xffff<<14;
+        SUINT A = 0xffff<<14;
         av_assert2(uvalpha <= 4096U);
 
         for (i = 0; i < dstW; i++) {
@@ -1549,7 +1549,7 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const 
int32_t *buf0,
             Y += (1 << 13) - (1 << 29);
 
             if (hasAlpha) {
-                A = abuf0[i] * (1 << 11);
+                A = abuf0[i] * (SUINT)(1 << 11);
 
                 A += 1 << 13;
             }

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

Reply via email to