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 ESMTP id 0F8D04B989 for ; Thu, 1 Aug 2024 17:07:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F0C868D7A6; Thu, 1 Aug 2024 20:07:35 +0300 (EEST) 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 6432368CC55 for ; Thu, 1 Aug 2024 20:07:29 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DD3F8E0003 for ; Thu, 1 Aug 2024 17:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722532049; 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=S7B9rK+/4dLVa+bwf3rlmqFL08n4BuCa9DUmQosKxV8=; b=GCkVrX1r75qEIQVNHCb7lKpAIyDwbO7/jQx6YdbPSD3J2obg8a3vj0VazWXkSpv0KISYFS uh9A59LQ3KQZNM+0eN8umTG4eMY6EJOKYaVN5+iajJGFdxTWu81jFzsBzYiVrDHue0+7+m 20sIOb8wCpDgEKLfVfOY0vq54yaLY3GVC1fP+pN9XaIRreuK9Zfz1GAStvCi7CIVTlOTWN npZPH5VV0CGnOrFel6L02UR73O5rpg/BmEeEpI8yh5T3cl2Zvs24wSFHnwg5cQaRhBSCqM LfeHaYOgJysm/GHgfx5f1jjmRg5hl5BoEGrPsgW1+WsWEmtcj4lucfGrB/htIA== Date: Thu, 1 Aug 2024 19:07:28 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240801170728.GZ4991@pb2> References: <20240731195410.274508-1-michael@niedermayer.cc> <20240731195410.274508-4-michael@niedermayer.cc> <2a592cad-94dd-41c6-898b-9847c142f6da@lynne.ee> MIME-Version: 1.0 In-Reply-To: <2a592cad-94dd-41c6-898b-9847c142f6da@lynne.ee> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 4/6] avcodec/aac/aacdec_usac: Clean ics2->max_sfb when first SCE fails 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="===============0535053969966516045==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0535053969966516045== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QM2s2stmEMx7KYVZ" Content-Disposition: inline --QM2s2stmEMx7KYVZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 01, 2024 at 05:11:18PM +0200, Lynne via ffmpeg-devel wrote: > On 31/07/2024 21:54, Michael Niedermayer wrote: > > Fixes: out of array access > > Fixes: 70734/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM= _fuzzer-4741427068731392 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/aac/aacdec_usac.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c > > index 82db65eb0d0..2938e693874 100644 > > --- a/libavcodec/aac/aacdec_usac.c > > +++ b/libavcodec/aac/aacdec_usac.c > > @@ -918,8 +918,10 @@ static int decode_usac_stereo_info(AACDecContext *= ac, AACUSACConfig *usac, > > } > > ret =3D setup_sce(ac, sce1, usac); > > - if (ret < 0) > > + if (ret < 0) { > > + ics2->max_sfb =3D 0; > > return ret; > > + } > > ret =3D setup_sce(ac, sce2, usac); > > if (ret < 0) >=20 > Err, the one and only place where setup_sce can return an error is also > where ics->max_sfb =3D 0; is cleaned up. It doesn't make sense that this = patch > would do anything at all. there are 2 single channel elements when the first fails, it automatically cleans the firsts max_sfb but as is = before this patch it leaves the 2nd SCE max_sfb unchanged to whatever unchecked va= lue was put in it. It would get checked and cleared in the next setup_sce() call but that is never called if the first fails thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. --QM2s2stmEMx7KYVZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZqvA0AAKCRBhHseHBAsP q5M/AKCbSbjSVMu8eOoXlJP0IoaEP46eUgCfT4LVafZAAn7EcIGMgGBHMVff8m0= =s5AK -----END PGP SIGNATURE----- --QM2s2stmEMx7KYVZ-- --===============0535053969966516045== 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". --===============0535053969966516045==--