From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id C3F364C130 for ; Wed, 5 Feb 2025 18:47:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0212568B8A5; Wed, 5 Feb 2025 20:47:02 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA21B680A42 for ; Wed, 5 Feb 2025 20:46:55 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0A9B14441A for ; Wed, 5 Feb 2025 18:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1738781215; 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=aR7fzjXkpCowLoWXFMZcnKed0OTG5BlapVS3lizngnk=; b=Y8is0A+hOAmDJ8LC0eUnZb9AydNRAsYr2R7zFtNYSYNdYuTKa4JPFyIGh9IEa03PBoa2/y nFDyrwHhsurtX0QFGEEkAikEa1SB36vl31u3CnnZGTFGPUpuHijv9JmSX+xJAxsX1xJrw+ GW0t7xXGSPW1QYOQkBab6VQQ/oXJEURxRx+C4erqPxmYtYNeRU5M9uEnpsOlUyD414IIwP An6gi4crhvFYEw/Ev1EQ6HCLHR9tsGUifMlRlJc4LlUZ6f09acpdAeqoc9e11DM26yRbv2 FfcHpApBDYwd5JMfExqTk6S46gkSg/0fC4xBcNHBq4ZVBXWzrkIKkIwx5sPoMg== Date: Wed, 5 Feb 2025 19:46:54 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250205184654.GE4991@pb2> References: <20250204025845.2059863-1-michael@niedermayer.cc> <20250204025845.2059863-3-michael@niedermayer.cc> <6c48d727-739d-45c6-a043-cde0d0829efc@gmail.com> MIME-Version: 1.0 In-Reply-To: <6c48d727-739d-45c6-a043-cde0d0829efc@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnheptefggedvffeiueffvefhiedtgfefjedukeefgeetgeevgeejgeekvdevjeelveeknecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/osq: avoid undefined negation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============8692974127392112174==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8692974127392112174== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pCY456bnaOE35grE" Content-Disposition: inline --pCY456bnaOE35grE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 04, 2025 at 12:16:59AM -0300, James Almer wrote: > On 2/3/2025 11:58 PM, Michael Niedermayer wrote: > > Fixes: negation of -2147483648 cannot be represented in type 'int32_t' = (aka 'int'); cast to an unsigned type to negate this value to itself > > Fixes: 390646659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_= fuzzer-5040277374435328 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/osq.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/osq.c b/libavcodec/osq.c > > index 83b4a9d618d..5c7826778dc 100644 > > --- a/libavcodec/osq.c > > +++ b/libavcodec/osq.c > > @@ -190,7 +190,7 @@ static uint32_t get_urice(GetBitContext *gb, int k) > > static int32_t get_srice(GetBitContext *gb, int x) > > { > > - int32_t y =3D get_urice(gb, x); > > + uint32_t y =3D get_urice(gb, x); > > return get_bits1(gb) ? -y : y; >=20 > Does -y here work as intended now that y is unsigned? why would it not ? subtraction is the same operation for signed (twos complement) and unsigned thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle --pCY456bnaOE35grE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ6OyHgAKCRBhHseHBAsP q3vMAJ4lzea5qJv3xmpAUSA8lhorScXsBwCeKP0jA6PYUKTZ2LoMfaQT6Nr7teY= =iyi6 -----END PGP SIGNATURE----- --pCY456bnaOE35grE-- --===============8692974127392112174== 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 https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============8692974127392112174==--