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 3122142630 for ; Mon, 21 Mar 2022 19:09:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 12E9B68AE62; Mon, 21 Mar 2022 21:09:20 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2049B68A5BE for ; Mon, 21 Mar 2022 21:09:13 +0200 (EET) 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 52B87C0008 for ; Mon, 21 Mar 2022 19:09:12 +0000 (UTC) Date: Mon, 21 Mar 2022 20:09:11 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220321190911.GM2829255@pb2> References: <20220318010729.12418-1-jamrial@gmail.com> MIME-Version: 1.0 In-Reply-To: <20220318010729.12418-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/wmaprodec: ensure channel count in the private context and decoder context are consistent 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="===============5922210142093704667==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5922210142093704667== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KBLq/gdY+DbOJWMr" Content-Disposition: inline --KBLq/gdY+DbOJWMr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 17, 2022 at 10:07:29PM -0300, James Almer wrote: > avctx->ch_layout will be reinitialized using channel_mask later in the > function. >=20 > Signed-off-by: James Almer > --- > libavcodec/wmaprodec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c > index 5c1d38eca5..6a8b895c1b 100644 > --- a/libavcodec/wmaprodec.c > +++ b/libavcodec/wmaprodec.c > @@ -402,7 +402,7 @@ static av_cold int decode_init(WMAProDecodeCtx *s, AV= CodecContext *avctx, int nu > s->decode_flags =3D AV_RL16(edata_ptr+14); > channel_mask =3D AV_RL32(edata_ptr+2); > s->bits_per_sample =3D AV_RL16(edata_ptr); > - s->nb_channels =3D avctx->ch_layout.nb_channels; > + s->nb_channels =3D channel_mask ? av_popcount(channel_mask) = : avctx->ch_layout.nb_channels; Fixes: 45736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAPRO_fuzze= r-5769886813519872 and please apply this or a equivalent patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The smallest minority on earth is the individual. Those who deny=20 individual rights cannot claim to be defenders of minorities. - Ayn Rand --KBLq/gdY+DbOJWMr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYjjNVwAKCRBhHseHBAsP q/c6AJ0aeUPRi0BIENAlifeqBHbSLAKm2gCfSgx6Cn2x2N50t+HXl91URr8l79A= =frRn -----END PGP SIGNATURE----- --KBLq/gdY+DbOJWMr-- --===============5922210142093704667== 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". --===============5922210142093704667==--