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 ESMTPS id EEF654C86E for ; Sun, 9 Feb 2025 07:16:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 874A468BC13; Sun, 9 Feb 2025 09:16:45 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C8A8F68B485 for ; Sun, 9 Feb 2025 09:16:38 +0200 (EET) Received: from b23210acc22a312b5f9efa84d03776bb ([1.145.216.185]) (authenticated (0 bits)) by mx.sdf.org (8.18.1/8.14.3) with ESMTPSA id 5197GOJn015168 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Sun, 9 Feb 2025 07:16:33 GMT Date: Sun, 9 Feb 2025 18:16:22 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <20250209022421.2346210-1-michael@niedermayer.cc> <20250209022421.2346210-5-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20250209022421.2346210-5-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 5/6] avformat/iff: Check that we have a stream in read_dst_frame() 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="===============5130700905649478664==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5130700905649478664== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l6UTwBJ+/mIW2v7C" Content-Disposition: inline --l6UTwBJ+/mIW2v7C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 09, 2025 at 03:24:20AM +0100, Michael Niedermayer wrote: > Fixes: null pointer dereference > Fixes: 385644864/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-455= 1049565765632 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/iff.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/libavformat/iff.c b/libavformat/iff.c > index 38f90dd81cb..7142a06e98f 100644 > --- a/libavformat/iff.c > +++ b/libavformat/iff.c > @@ -364,6 +364,9 @@ static int read_dst_frame(AVFormatContext *s, AVPacke= t *pkt) > uint64_t chunk_pos, data_pos, data_size; > int ret =3D AVERROR_EOF; > =20 > + if (s->nb_streams < 1) > + return AVERROR_INVALIDDATA; > + > while (!avio_feof(pb)) { > chunk_pos =3D avio_tell(pb); > if (chunk_pos >=3D iff->body_end) > --=20 > 2.48.1 please apply, thanks. -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --l6UTwBJ+/mIW2v7C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCZ6hWQgAKCRBnYHnFrEDd a6IKAJ0U0bCyf7K+6NAhoEQ0T1gsh+Ob4QCglkDe0Avnq0t9mlmq33ML6/V+Qn0= =Tggf -----END PGP SIGNATURE----- --l6UTwBJ+/mIW2v7C-- --===============5130700905649478664== 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". --===============5130700905649478664==--