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 E41DA42533 for ; Fri, 18 Mar 2022 11:41:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E064B68B0C3; Fri, 18 Mar 2022 13:41:03 +0200 (EET) Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B21668AE59 for ; Fri, 18 Mar 2022 13:40:57 +0200 (EET) Received: from relay11.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::231]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 34E83C7686 for ; Fri, 18 Mar 2022 11:28:33 +0000 (UTC) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 47FE2100011 for ; Fri, 18 Mar 2022 11:28:26 +0000 (UTC) Date: Fri, 18 Mar 2022 12:28:26 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220318112826.GS2829255@pb2> References: <20220317233019.12049-1-michael@niedermayer.cc> <20220317233019.12049-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/alsdec: Set channels from data after data is set 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="===============6736279243558033388==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6736279243558033388== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P4iVvP27TPzU8KQW" Content-Disposition: inline --P4iVvP27TPzU8KQW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 17, 2022 at 08:40:48PM -0300, James Almer wrote: > On 3/17/2022 8:30 PM, Michael Niedermayer wrote: > > Fixes: out of array write > > Fixes: 45624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzz= er-6473487382872064 > > Fixes: 45626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzz= er-4874997192065024 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/alsdec.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c > > index 822cf211b0..73af829178 100644 > > --- a/libavcodec/alsdec.c > > +++ b/libavcodec/alsdec.c > > @@ -1986,7 +1986,7 @@ static av_cold int decode_init(AVCodecContext *av= ctx) > > unsigned int c; > > unsigned int channel_size; > > int num_buffers, ret; > > - int channels =3D avctx->ch_layout.nb_channels; > > + int channels; > > ALSDecContext *ctx =3D avctx->priv_data; > > ALSSpecificConfig *sconf =3D &ctx->sconf; > > ctx->avctx =3D avctx; > > @@ -2000,6 +2000,7 @@ static av_cold int decode_init(AVCodecContext *av= ctx) > > av_log(avctx, AV_LOG_ERROR, "Reading ALSSpecificConfig failed= =2E\n"); > > return ret; > > } > > + channels =3D avctx->ch_layout.nb_channels; > > if ((ret =3D check_specific_config(ctx)) < 0) { > > return ret; >=20 > LGTM will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates --P4iVvP27TPzU8KQW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYjRs2QAKCRBhHseHBAsP qy7NAJ0a38O324hehgdPGycajBENvIo88ACgkmYkgZmpnCFGtRMPpXM3NUxEsoU= =Bipu -----END PGP SIGNATURE----- --P4iVvP27TPzU8KQW-- --===============6736279243558033388== 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". --===============6736279243558033388==--