From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 75D124DFF8 for ; Fri, 13 Feb 2026 00:59:39 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'JNJt921uXv9XCtWKVyipsRPdzHRJuDlgjQEYoiXk0vU=', expected b'B6p8WtsSCNi2kJyd6BFTzasEov46KaYnSQmbrc5zKRg=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1770944369; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=JNJt921uXv9XCtWKVyipsRPdzHRJuDlgjQEYoiXk0vU=; b=3ZQrT2L86GqH/Qn7mjfC51jLwYLDLfndaZy9kf1ONukhPVpWOaVbZmF8VwFNNnj1B2GNx rJ8Lfd63Vrp5PHMprmH8bB8RXmMpYthqP6XjQ8IkpJCVRGcZme0K9CVnRFFYH+Tprj4bFaX DGpCHMWx16VC2J7oCKVy6eVgoPSKbiZXPOVYH7wS4qNnBozD5tElVbmUX3oY9SS+Jbzxhda QceRmuV8zyLPh9BGGEBPgA8ZseOTo6PpmxdEr2dlu6jRIq4sMspzOj3S8B2WqmnYosd2L1t 1uI2hoof9YAXy/IP8Tf3ifq9ISsbMbNdhlALLXvZ4sdnFqQnD5zyHYnsZJiA== Received: from [172.20.0.3] (unknown [172.20.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id A2F41691F66; Fri, 13 Feb 2026 02:59:29 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1770944358; b=iTCDGUdUKu5y4M4xNAYQASiu95P6NzfTTUfH6jRVUWFizpCSPOmTH6Yt5oIu7u1nH5+Bm PgHTIVeo61cpb9tB4oCcPG+E7SlRGJQSHPPzB3X07Mhz4QS8fgdlBwkjz6oBPGiK/OpH+8s kBEn3lqbVQcVl374OAyAcouDbHwlI0UO/pfiSpqLfW3r/ulW8laMTB3etfT1/1XOzfPqsCD BQK7iRgafxHNIbv8UKyAb5RGhQG4mOwOLVbHSbNHyTZWIIhg2vIUj1WgAX2sQ/Efa1uBoPH AHts6v+BSJ/OK2X/AZY+eq1303Xrd+/XYgiKe/0g6gKK7zPfVNpAM+o0M8fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1770944358; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=q1gi067R/1J+kBp1sy0c6qu4RCMFVLbnl34N3eQ2h+g=; b=Hraw34tl0BNjElnpb/R+aSy3E/u8ZbsqEV0vHN6SU6adj9xPH+KKIhPUljOy6p2KqF2yO e0hIdZ3FY5vfUsZemmpg7IIBGTsYRtaBw0AJcR/Ww6VqeIoxvxiLuvJ97bnhqPPAXleFF9z c1wRNKFJjkr1ccA5i0eG2i8d44W4YTDIruUqwGMjKbJV9ti1hIgj0BsSkjaYrJm1Ofg6P0I K7k8Q7wG7jEd6fB7JYYSFCUtbvtmEVt0yeBqUEoPzo80wtDfMzvs91OfAb+QXg3ZZ5ODcaH 4cU70FmOI3kVtLwEC6yeCeABdDN3Pw259+t4xCv9tH4QDWbCAk+IiaNecANQ== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1770944349; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=B6p8WtsSCNi2kJyd6BFTzasEov46KaYnSQmbrc5zKRg=; b=RKJ+BA3Hw5q2Zdvwk9FvbRX4UPGY8QXtbr6C2d85NgBurenLvrAii6vCRSj3JRhKMkIN5 V7fgX+088F63z/ZvSKjlfg9l4UKZHJeIhpCXAAluFlCUuTRdAVmthH2A8st0rEBh4BUgCyi IAQ4pGm2+cM5ElsQVVukckgMJNEGqLyNSzDhKQ5jMffrFxf2Ia0bW1j/wCvfYME0XveBqTd SQD98HiJbzn4L+q+3WLjTa+Zrnw0isdQ87VLqe/IT0K6/wyD8nJYAlu2Mke31LdC2UNnKtB 5gJoeu7XDaOdUMXWxlEeKMxGNommknAkYuj8uS28o/lmI9fe0BFc3jGxoM3g== Received: from c8d966988b92 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id BA8F9691EDF for ; Fri, 13 Feb 2026 02:59:09 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Feb 2026 00:59:09 -0000 Message-ID: <177094434988.25.4673623900867175597@009cbcb3d8cd> Message-ID-Hash: 5JJYKZ3TKFVVKSVX3DH5DBVWMH77HXGN X-Message-ID-Hash: 5JJYKZ3TKFVVKSVX3DH5DBVWMH77HXGN X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] swscale/output: Fix some integer overflows in yuv2rgba64_full*() (PR #21743) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: michaelni via ffmpeg-devel Cc: michaelni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21743 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21743 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21743.patch Fixes: integer overflows Fixes: 471587361/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5015347829997568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer >>From 7c9a6ffb976506bae8298e85e6369b7f2d10791e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 13 Feb 2026 00:16:24 +0100 Subject: [PATCH] swscale/output: Fix some integer overflows in yuv2rgba64_full*() Fixes: integer overflows Fixes: 471587361/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5015347829997568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libswscale/output.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index a3b8da54bf..94454860c3 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -1416,9 +1416,9 @@ yuv2rgba64_full_X_c_template(SwsInternal *c, const int16_t *lumFilter, Y += (1 << 13) - (1<<29); // 21 // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit - R = V * c->yuv2rgb_v2r_coeff; - G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; - B = U * c->yuv2rgb_u2b_coeff; + R = (unsigned)V * c->yuv2rgb_v2r_coeff; + G = (unsigned)V * c->yuv2rgb_v2g_coeff + (unsigned)U * c->yuv2rgb_u2g_coeff; + B = (unsigned)U * c->yuv2rgb_u2b_coeff; // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit output_pixel(&dest[0], av_clip_uintp2(((int)(R_B + (unsigned)Y)>>14) + (1<<15), 16)); @@ -1457,9 +1457,9 @@ yuv2rgba64_full_2_c_template(SwsInternal *c, const int32_t *buf[2], av_assert2(uvalpha <= 4096U); for (i = 0; i < dstW; i++) { - int Y = (int)(buf0[i] * yalpha1 + buf1[i] * yalpha) >> 14; - int U = (int)(ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha - (128 << 23)) >> 14; - int V = (int)(vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha - (128 << 23)) >> 14; + unsigned Y = (int)(buf0[i] * yalpha1 + buf1[i] * yalpha) >> 14; + unsigned U = (int)(ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha - (128 << 23)) >> 14; + unsigned V = (int)(vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha - (128 << 23)) >> 14; int R, G, B; Y -= c->yuv2rgb_y_offset; @@ -1476,9 +1476,9 @@ yuv2rgba64_full_2_c_template(SwsInternal *c, const int32_t *buf[2], A += 1 << 13; } - output_pixel(&dest[0], av_clip_uintp2(((R_B + Y) >> 14) + (1<<15), 16)); - output_pixel(&dest[1], av_clip_uintp2((( G + Y) >> 14) + (1<<15), 16)); - output_pixel(&dest[2], av_clip_uintp2(((B_R + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest[0], av_clip_uintp2(((int)(R_B + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest[1], av_clip_uintp2(((int)( G + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest[2], av_clip_uintp2(((int)(B_R + Y) >> 14) + (1<<15), 16)); if (eightbytes) { output_pixel(&dest[3], av_clip_uintp2(A, 30) >> 14); dest += 4; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org