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 80DAF4C4EF for ; Fri, 13 Feb 2026 02:18:08 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'iKO7Df88TQdhm0t1U3xLbHK1KrhHCB9KUKaqwsD84dQ=', expected b'swmIekGmpuWwsKPpy9WkPFIVEaisE3A5aDVZbEkbISI=')) header.d=niedermayer.cc 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=1770949076; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=WDQgR2zPlD+adFyga0ZfwChLyXt0CeQIs1gYrc9fHgs=; b=d4mzmoh5L79z+BdAGDe1VT2qi9dBlY9fPkAbT2jxQQO1Zf5gGQLZjHakVpc0bX7NbGDZP Zc4ezZo7DDc9gj5HmfRqIvIdw54zfdKTBAKtztFELgc3TrEq3KpgNgmq3XjWK99KfUFnW1Q HkpPQB3dAUEeyBeNTl0Lw1QUbrA6UZgGIqWTbTxhXe45ExhgwlBudTTJxYw2UIHjoOSdEVA fD6/9bAMhRdpREv9TUknlzzo+K9MoNbfmr7B8axnuR7mkNxE2k8VisxHNXyGsyUNn/u9ofP g++dwXhMC2YVup8plD9yxGFhBrYha2KUGjhiIERTalxiGtxxiz6Z2s8GTuoQ== Received: from [172.20.0.3] (unknown [172.20.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C6127691FCC; Fri, 13 Feb 2026 04:17:56 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1770949065; b=ofaD7UNBHOleqhAPt/sgteqxC1btvd3ryHKdSbEcuH1ON/Jpuq3m0lFOYOuJuSF2UiaJ3 H+pVRImM/ULXM58VAIM/C75dBnMmFOZGAbOui1rkmGz5vYMJhG2obIV1oiBFFAUK5kgEs2/ wBAphdS/aQccCnB/I1C8aQu3JufBcW4tUB6l9TX5dXxE0zKsUYXtqwxGhLwVCgkOIw7i3Yq +qkxIY916+nCToaWE7ZLSP2p6mAi+W3VgcBzUkoYcpfdvhhQ19xKo5iq7mt0iEYVlVLeveG KwxnJ/AjnpYXQFZaPCKR1kyNv2tO4oVhnerTMX2F+t1Ct1Lcr9JdstGTNp6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1770949065; 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=iKO7Df88TQdhm0t1U3xLbHK1KrhHCB9KUKaqwsD84dQ=; b=VZm/8PbNhAcVT5QzSFTGRGagzrgzdLTCEr9Hifui6PnEiSICV7Ea7z+TE2Xf756n29Ao/ KIBTzzYMVZ6NXw2bcSplrZbupZH+LF7nDUo+Ty/6NCVWNTTMTP/pwIEWOWtFdUmbG3MKlVi 7eWqxzefuqi74vXACir7nYi8r3rm2zOdyvIP5/zVKXiRPUvXdnZx+21bFDidxM212mfaCTn yxuIXbJMI12pQbFsJW7FEvjWY0dAQC7bs67TD4q2Sqv3Oklj77wiGz7Tt2jpNkNzkHv4gAX 3szX+nK/LhPL+PsWIyMXEmuD+2laeYjGiq9GVM4rutur9LDTkkXhsj0I4s1A== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C1D5E691F7A for ; Fri, 13 Feb 2026 04:17:30 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id DF95144361 for ; Fri, 13 Feb 2026 02:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1770949050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=swmIekGmpuWwsKPpy9WkPFIVEaisE3A5aDVZbEkbISI=; b=fjEGvgYXU/nKtGMDwNd2YYVzvkX6RFfQeywb3Wxo8r24hF9BP+mRm2suy2Uc30kvBD+RTm RYrwYY8BrfER8QxAdbvlA313btlXKox61zzoT9ruTbJmVrtj9snl6nl0FRgTgUiAm+v0xg j8zi1bwczT4WbfiUZGUM6TYQ14FjObS0DgzFxBFvMRHJMLhisnaNaEfNllRqfQxujVfxRI nLlJeFctWmzULGg7INnw3kW5UHbT0jGtPzJ0XsAQt5UpV8qsL2tv75lOWWRMDXGyvlZKH3 wHZBSoXaikD+cIW+uUuFr2aelADSVFi7+b0aTodJTDrKTXEqjW9Ao/LoSRgu3g== Date: Fri, 13 Feb 2026 03:17:27 +0100 To: FFmpeg development discussions and patches Message-ID: References: <20260211090042.3466410-1-hankang201222@gmail.com> MIME-Version: 1.0 In-Reply-To: <20260211090042.3466410-1-hankang201222@gmail.com> X-GND-Sasl: michael@niedermayer.cc X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvtdejtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieeirdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeiiedrhedtpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpqhhiugepfffhleehudeggeefiedupdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg Message-ID-Hash: WTVXF6ZU55AD54SXKH7E3MEDENSQDJB5 X-Message-ID-Hash: WTVXF6ZU55AD54SXKH7E3MEDENSQDJB5 X-MailFrom: SRS0=8RjS=AR=niedermayer.cc=michael@ffmpeg.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] libswscale/output: fix signed integer overflow in yuv2rgba64 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: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============4057342601754055191==" Archived-At: List-Archive: List-Post: --===============4057342601754055191== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QRMVcFVLjEHz/kDt" Content-Disposition: inline --QRMVcFVLjEHz/kDt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Hankang Li On Wed, Feb 11, 2026 at 01:00:42AM -0800, Hankang Li via ffmpeg-devel wrote: > Clamp the intermediate alpha value within 19 bits, this prevents > overflow. >=20 > Note: This issue is only reproducible with --disable-x86asm. There is an > existing issue in fate-sws-unscaled with --disable-x86asm (ticket > #21113). This change does not introduce any new regressions. >=20 > Signed-off-by: Hankang Li > --- > libswscale/output.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/libswscale/output.c b/libswscale/output.c > index a3b8da54bf..afb3878170 100644 > --- a/libswscale/output.c > +++ b/libswscale/output.c > @@ -1288,8 +1288,8 @@ yuv2rgba64_1_c_template(SwsInternal *c, const int32= _t *buf0, > Y2 +=3D (1 << 13) - (1 << 29); > =20 > if (hasAlpha) { > - A1 =3D abuf0[i * 2 ] * (1 << 11); > - A2 =3D abuf0[i * 2 + 1] * (1 << 11); > + A1 =3D av_clip_uintp2(abuf0[i * 2 ], 19) * (1 << 11); > + A2 =3D av_clip_uintp2(abuf0[i * 2 + 1], 19) * (1 << 11); > =20 > A1 +=3D 1 << 13; > A2 +=3D 1 << 13; > @@ -1337,8 +1337,8 @@ yuv2rgba64_1_c_template(SwsInternal *c, const int32= _t *buf0, > Y2 +=3D (1 << 13) - (1 << 29); > =20 > if (hasAlpha) { > - A1 =3D abuf0[i * 2 ] * (1 << 11); > - A2 =3D abuf0[i * 2 + 1] * (1 << 11); > + A1 =3D av_clip_uintp2(abuf0[i * 2 ], 19) * (1 << 11); > + A2 =3D av_clip_uintp2(abuf0[i * 2 + 1], 19) * (1 << 11); > =20 > A1 +=3D 1 << 13; > A2 +=3D 1 << 13; A1/A2 are already cliped a few lines later cliping them twice is not reasonable thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin --QRMVcFVLjEHz/kDt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaY6JsAAKCRBhHseHBAsP q58KAJ9fc+h4g8n0vh/WfsDqjydSHtrpywCghMuGa2soeaEEM2oxiAJqUAScRKA= =EL1n -----END PGP SIGNATURE----- --QRMVcFVLjEHz/kDt-- --===============4057342601754055191== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============4057342601754055191==--