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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new d41b8d95a7 swscale/output: Use 64bit in addition in  
yuv2gbrp16_full_X_c() for RGB + Y
d41b8d95a7 is described below

commit d41b8d95a7234cf0b34fcb84e307385fb3ef30a1
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Dec 22 23:44:54 2025 +0100
Commit:     michaelni <[email protected]>
CommitDate: Tue Dec 23 09:14:44 2025 +0000

    swscale/output: Use 64bit in addition in  yuv2gbrp16_full_X_c() for RGB + Y
    
    Fixes: signed integer overflow: -1159988356 + -1082982400 cannot be 
represented in type 'int'
    Fixes: 
461519938/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4777382021234688
    
    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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 4b3aab3109..a3b8da54bf 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2513,9 +2513,9 @@ yuv2gbrp16_full_X_c(SwsInternal *c, const int16_t 
*lumFilter,
         G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
         B =                            U * c->yuv2rgb_u2b_coeff;
 
-        dest16[2][i] = av_clip_uintp2(((Y + R) >> 14) + (1<<15), 16);
-        dest16[0][i] = av_clip_uintp2(((Y + G) >> 14) + (1<<15), 16);
-        dest16[1][i] = av_clip_uintp2(((Y + B) >> 14) + (1<<15), 16);
+        dest16[2][i] = av_clip_uintp2(((Y + (int64_t)R) >> 14) + (1<<15), 16);
+        dest16[0][i] = av_clip_uintp2(((Y + (int64_t)G) >> 14) + (1<<15), 16);
+        dest16[1][i] = av_clip_uintp2(((Y + (int64_t)B) >> 14) + (1<<15), 16);
 
         if (hasAlpha)
             dest16[3][i] = av_clip_uintp2(A, 30) >> 14;

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

Reply via email to