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 2C1B94FBDE for ; Thu, 3 Jul 2025 13:50:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 316F468EB04; Thu, 3 Jul 2025 16:50:28 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 5BE6268E22F for ; Thu, 3 Jul 2025 16:50:21 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id BE0E94430D for ; Thu, 3 Jul 2025 13:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1751550620; 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=wXT6sjevDrB6dC9hroEJMIOswN6jNcrsS/R5TWon3lw=; b=XQYJFoqzIGNOxxPW5EpS6dfHaulmDU4XjJOpR8cObNjCLrnHUNFk1I+CmvlvPnfhkGrXUF ntoD2Fh0PhPiSOKikTwVYixuqyF3RU2rbCNx58fSu8Th5i6Gr1l1O2mzhBnVvyl9+2cFRb yZvyEKYFn9PNNIb1FhBtP3teYQiv+QYEa2r0X7y1LMoGoNCDNi8AySmneJDPOx5cCpbTLq lPRdfISYuJM4pbMlOteqctN2B3S8IThWV5gYqv0R7J4RAPBQEJEZsFjlmtFRZBvSvUBfxe 8DqpNMHcjJVGy0RuMOqA/zX76ahfWTl0/S97tv+ojcGK9noC21l40GcH1qG4/g== Date: Thu, 3 Jul 2025 15:50:19 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250703135019.GH29660@pb2> References: <20250703020131.2506428-1-michael@niedermayer.cc> <20250703020131.2506428-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddvtdeggecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnheptefggedvffeiueffvefhiedtgfefjedukeefgeetgeevgeejgeekvdevjeelveeknecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieeirddvvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirddvvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/5] avcodec/get_bits: Use FF_PTR_ADD() in init_get_bits() 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="===============0164744716598137446==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0164744716598137446== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Dfg64V1vrH5yHE+e" Content-Disposition: inline --Dfg64V1vrH5yHE+e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 03, 2025 at 08:26:23AM +0100, Kieran Kunhya via ffmpeg-devel wr= ote: > Date: Thu, 3 Jul 2025 08:26:23 +0100 > From: Kieran Kunhya > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH 3/5] avcodec/get_bits: Use FF_PTR_ADD(= ) in init_get_bits() >=20 > On Thu, 3 Jul 2025, 03:02 Michael Niedermayer, > wrote: >=20 > > Fixes: NULL + 0 > > Fixes: > > 421817631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-= 4957386534354944 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by > > : > > Michael Niedermayer > > --- > > libavcodec/get_bits.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h > > index 19542965697..bf6929aa65d 100644 > > --- a/libavcodec/get_bits.h > > +++ b/libavcodec/get_bits.h > > @@ -511,7 +511,7 @@ static inline int init_get_bits(GetBitContext *s, > > const uint8_t *buffer, > > s->buffer =3D buffer; > > s->size_in_bits =3D bit_size; > > s->size_in_bits_plus8 =3D bit_size + 8; > > - s->buffer_end =3D buffer + buffer_size; > > + s->buffer_end =3D buffer_size ? buffer + buffer_size : buf= fer; > > s->index =3D 0; > > > > return ret; > > -- > > 2.49.0 > > >=20 > Doesn't match commit message yes, i didnt like either variant FF_PTR_ADD() needs #include internal.h which thenb gets included in most of the codebase ill post a better patch that avoids the bad arguments before init_get_bits* is called thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Take away the freedom of one citizen and you will be jailed, take away the freedom of all citizens and you will be congratulated by your peers in Parliament. --Dfg64V1vrH5yHE+e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaGaKmAAKCRBhHseHBAsP q82yAKCE0/jhpdb9SVp0+xBJkxs2QQ7THgCfdARoPi9qJXoGjSBfaQcEY/oX8o8= =dzhu -----END PGP SIGNATURE----- --Dfg64V1vrH5yHE+e-- --===============0164744716598137446== 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". --===============0164744716598137446==--