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 CD09643ADF for ; Tue, 12 Jul 2022 18:11:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6731A68B937; Tue, 12 Jul 2022 21:11:23 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DF9268B89A for ; Tue, 12 Jul 2022 21:11:17 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 3D9941BF207 for ; Tue, 12 Jul 2022 18:11:16 +0000 (UTC) Date: Tue, 12 Jul 2022 20:11:15 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220712181115.GI396728@pb2> References: <20220627084347.30362-1-michael@niedermayer.cc> <165639370846.12703.18353942820053902051@lain.khirnov.net> <5868ba10-3131-7a10-da47-e586a7234857@gmail.com> <20220628192830.GT396728@pb2> MIME-Version: 1.0 In-Reply-To: <20220628192830.GT396728@pb2> Subject: Re: [FFmpeg-devel] [PATCH] avformat/aaxdec: Check for empty segments 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="===============2927504572709297580==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2927504572709297580== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Vpwm3m7lzScpRN/m" Content-Disposition: inline --Vpwm3m7lzScpRN/m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 28, 2022 at 09:28:30PM +0200, Michael Niedermayer wrote: > On Tue, Jun 28, 2022 at 08:26:54AM -0300, James Almer wrote: > >=20 > >=20 > > On 6/28/2022 2:21 AM, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2022-06-27 10:43:47) > > > > Fixes: Timeout > > > > Fixes: 48154/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5= 149094353436672 > > > >=20 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-= fuzz/tree/master/projects/ffmpeg > > > > Signed-off-by: Michael Niedermayer > > > > --- > > > > libavformat/aaxdec.c | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > >=20 > > > > diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c > > > > index dd1fbde736..bcbff216db 100644 > > > > --- a/libavformat/aaxdec.c > > > > +++ b/libavformat/aaxdec.c > > > > @@ -252,6 +252,8 @@ static int aax_read_header(AVFormatContext *s) > > > > size =3D avio_rb32(pb); > > > > a->segments[r].start =3D start + a->data_offset; > > > > a->segments[r].end =3D a->segments[r].start + s= ize; > > > > + if (!size) > > > > + return AVERROR_INVALIDDATA; > > >=20 > > > Why check for invalid size only after some things are set based on it > > > and not before? >=20 > moved it up will apply [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates --Vpwm3m7lzScpRN/m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYs25QwAKCRBhHseHBAsP q9QbAJ9/A6/PMVt2vZTHpy7fWV+sOzH+oQCdEsrgi6+GL2JDzu4j7hqgKetOUEM= =uqS2 -----END PGP SIGNATURE----- --Vpwm3m7lzScpRN/m-- --===============2927504572709297580== 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". --===============2927504572709297580==--