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 BD8F14EF4A for ; Wed, 14 May 2025 23:25:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 5858D68BE50; Thu, 15 May 2025 02:25:07 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 006DD68BC73 for ; Thu, 15 May 2025 02:25:00 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id CB72543973 for ; Wed, 14 May 2025 23:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1747265100; 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=OsdTb/ru8S+UeLaB69kVRQaFEfNhdCAg3mv0JCfVg/U=; b=MMxEOXdORTj9ZE6wSW0EIJgNF9GDRm3pOc/rBm53AmcMhRRKZsmaNbgR7geWu3Ge5GMobg UfHWym1yytF2cPuBGWJ8NcX97cF4hR8l3k4Z07ZAG6GQMcutIpRq0rRltJMX9SxkGQgCU1 B5nLONaCHBQQgtv0dh0s6Uiszi/YU8E+qD4TdFUhCVrdT5xzllumBdH/OafXnEV3Q+lFFL UxH7wOhl1aoG8LqGiC2Otvcuv2oah7gGR1tAMeXflALMVHrH0VH3PguV5M2IWgNMH2V+GV SB2hfg6HL4F9bd3tAZxAh2kIoy2C7VNQEWKwYpiq+bqouA+NcVqfjukMd4JHtw== Date: Thu, 15 May 2025 01:24:58 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250514232458.GQ29660@pb2> References: <20250511003245.413345-1-michael@niedermayer.cc> <20250511003245.413345-7-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdekfedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 7/8] avcodec/svq3: Check that for 8 byte space before subtracting 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="===============4413722468224679296==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4413722468224679296== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VbXIs2ae+j0NhctA" Content-Disposition: inline --VbXIs2ae+j0NhctA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 14, 2025 at 06:34:25PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > No testcase > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/svq3.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c > > index f730358e2f9..30bc9334af7 100644 > > --- a/libavcodec/svq3.c > > +++ b/libavcodec/svq3.c > > @@ -1173,7 +1173,7 @@ static av_cold int svq3_decode_init(AVCodecContex= t *avctx) > > int w,h; > > =20 > > size =3D AV_RB32(&extradata[4]); > > - if (size > extradata_end - extradata - 8) > > + if (extradata_end - extradata < 8 || size > extradata_end - ex= tradata - 8) > > return AVERROR_INVALIDDATA; > > init_get_bits(&gb, extradata + 8, size * 8); > > =20 >=20 > Can't be triggered: This code is only executed iff marker_found is 1; > and given the "m + 8 < avctx->extradata_size" check in the loop it is > guaranteed that there are at least eight bytes of extradata available. True Did we ever had someone miss such distributed checks and produce buggy code through a change ? If not then i think you are correct here and lets skip adding an explicit check, its ugly to have such redundant checks thx --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The day soldiers stop bringing you their problems is the day you have stopp= ed=20 leading them. They have either lost confidence that you can help or conclud= ed=20 you do not care. Either case is a failure of leadership. - Colin Powell --VbXIs2ae+j0NhctA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaCUmRgAKCRBhHseHBAsP q4IJAKCayzpq4VvZBlbWEzlDUQvV2ACMxQCfTwbvP4m+5aafQB1RGcurHSfI+4k= =epNc -----END PGP SIGNATURE----- --VbXIs2ae+j0NhctA-- --===============4413722468224679296== 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". --===============4413722468224679296==--