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 E005D45CD1 for ; Tue, 1 Aug 2023 19:25:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AC81B68C49D; Tue, 1 Aug 2023 22:25:14 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 03E8968BD32 for ; Tue, 1 Aug 2023 22:25:07 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3A73120007 for ; Tue, 1 Aug 2023 19:25:06 +0000 (UTC) Date: Tue, 1 Aug 2023 21:25:06 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230801192506.GE7802@pb2> References: <20230722234621.28731-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate 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="===============7317741255156875097==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7317741255156875097== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/dFl7e5Y0zcWrcPL" Content-Disposition: inline --/dFl7e5Y0zcWrcPL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 01, 2023 at 12:55:49PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-66810= 35461230592 > > Fixes: Timeout > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/avr.c | 3 +++ > > 1 file changed, 3 insertions(+) > >=20 > > diff --git a/libavformat/avr.c b/libavformat/avr.c > > index 1cc4d56bfb..3fe8614b25 100644 > > --- a/libavformat/avr.c > > +++ b/libavformat/avr.c > > @@ -75,6 +75,9 @@ static int avr_read_header(AVFormatContext *s) > > avio_skip(s->pb, 20); > > avio_skip(s->pb, 64); > > =20 > > + if (st->codecpar->sample_rate =3D=3D 0) > > + return AVERROR_INVALIDDATA; > > + > > st->codecpar->codec_id =3D ff_get_pcm_codec_id(bps, 0, 1, sign); > > if (st->codecpar->codec_id =3D=3D AV_CODEC_ID_NONE) { > > avpriv_request_sample(s, "Bps %d and sign %d", bps, sign); >=20 > Why don't you check this directly after having read the sample rate? > That way the value would still be in a register. that would be cleaner too, I will apply it with that change thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Take away the freedom of one citizen and you will be jailed, take away the freedom of all citizens and you will be congratulated by your peers in Parliament. --/dFl7e5Y0zcWrcPL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZMlcDgAKCRBhHseHBAsP q8GqAJ4tBvJTSx8Ijml68rB2gxI6TYNMwgCgguy2TyebhnnDrHqFXLtk1jU5WNQ= =EXGO -----END PGP SIGNATURE----- --/dFl7e5Y0zcWrcPL-- --===============7317741255156875097== 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". --===============7317741255156875097==--