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 f50e22c68d swscale/output: avoid signed overflow in yuv2rgb_write_full 
luma scaling
f50e22c68d is described below

commit f50e22c68d1e579a3e2818a7d93d6eed092ad387
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Jul 1 06:09:33 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Jul 5 00:05:36 2026 +0000

    swscale/output: avoid signed overflow in yuv2rgb_write_full luma scaling
    
    Fixes: 
523522305/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4574409678716928
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
---
 libswscale/output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index cea7fb1185..760dca642e 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2003,8 +2003,8 @@ static av_always_inline void 
yuv2rgb_write_full(SwsInternal *c,
     int isrgb8 = target == AV_PIX_FMT_BGR8 || target == AV_PIX_FMT_RGB8;
 
     Y -= c->yuv2rgb_y_offset;
-    Y *= c->yuv2rgb_y_coeff;
-    Y += 1 << 21;
+    Y *= (unsigned)c->yuv2rgb_y_coeff;
+    Y += 1U << 21;
     R = (unsigned)Y + V*(unsigned)c->yuv2rgb_v2r_coeff;
     G = (unsigned)Y + V*(unsigned)c->yuv2rgb_v2g_coeff + 
U*(unsigned)c->yuv2rgb_u2g_coeff;
     B = (unsigned)Y +                                    
U*(unsigned)c->yuv2rgb_u2b_coeff;

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

Reply via email to