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 CB0CF4265B for ; Mon, 21 Mar 2022 21:04:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3C9FE68AB32; Mon, 21 Mar 2022 23:04:07 +0200 (EET) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6FD79680AC0 for ; Mon, 21 Mar 2022 23:04:00 +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 83EA1100008 for ; Mon, 21 Mar 2022 21:03:59 +0000 (UTC) Date: Mon, 21 Mar 2022 22:03:58 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220321210358.GO2829255@pb2> References: <20220321201946.16919-1-michael@niedermayer.cc> <20220321201946.16919-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs 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="===============3215632386860994818==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3215632386860994818== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="J5WvqshJl/0YpHNO" Content-Disposition: inline --J5WvqshJl/0YpHNO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 21, 2022 at 09:48:40PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: member access within null pointer of type 'const FFCodec' (aka '= const struct FFCodec') > > Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-65544= 45419249664 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/allcodecs.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > >=20 > > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c > > index b1aa7e266b..22d56760ec 100644 > > --- a/libavcodec/allcodecs.c > > +++ b/libavcodec/allcodecs.c > > @@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque) > > =20 > > ff_thread_once(&av_codec_static_init, av_codec_init_static); > > =20 > > - if (c) > > + if (c) { > > *opaque =3D (void*)(i + 1); > > - > > - return &c->p; > > + return &c->p; > > + } > > + return NULL; > > } > > =20 > > static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) >=20 > LGTM. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras --J5WvqshJl/0YpHNO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYjjoOgAKCRBhHseHBAsP q2BAAJ93GyJVOMTqV50Gm1gNVASOwXyvkwCgiy+3C7qJLllN5VV0ALugUDsVMFs= =aOYO -----END PGP SIGNATURE----- --J5WvqshJl/0YpHNO-- --===============3215632386860994818== 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". --===============3215632386860994818==--