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

Git pushed a commit to branch master
in repository ffmpeg.

commit 3ed2e4d62492e02ffb7188e13aae5ccbf966851e
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Nov 16 06:56:38 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Wed Nov 18 12:54:42 2026 +0000

    swscale/output: avoid signed overflow in the chroma products of 
yuv2gbrp16_full_X_c()
    
    Signed integer overflow Replicated through API with UBSAN
    
    Fixes: signed integer overflow: -130356 * 16525 cannot be represented in 
type 'int'
    Fixes: 
574937224/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5275640446910464
    Fixes: RSXytemqmJPo
    
    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 3e9086a310..463de1d9d2 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2522,9 +2522,9 @@ yuv2gbrp16_full_X_c(SwsInternal *c, const int16_t 
*lumFilter,
         Y -= c->yuv2rgb_y_offset;
         Y *= c->yuv2rgb_y_coeff;
         Y += (1 << 13) - (1 << 29);
-        R = V * c->yuv2rgb_v2r_coeff;
-        G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
-        B =                            U * c->yuv2rgb_u2b_coeff;
+        R = V * (unsigned)c->yuv2rgb_v2r_coeff;
+        G = V * (unsigned)c->yuv2rgb_v2g_coeff + U * 
(unsigned)c->yuv2rgb_u2g_coeff;
+        B =                                      U * 
(unsigned)c->yuv2rgb_u2b_coeff;
 
         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);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to