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 6D98F45531 for ; Tue, 31 Jan 2023 20:27:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AEEA468BE7A; Tue, 31 Jan 2023 22:27:38 +0200 (EET) 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 B96F468BDE8 for ; Tue, 31 Jan 2023 22:27:32 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id C41F520004 for ; Tue, 31 Jan 2023 20:27:31 +0000 (UTC) Date: Tue, 31 Jan 2023 21:27:30 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230131202730.GK1949656@pb2> References: <20230130234527.13149-1-michael@niedermayer.cc> <20230130234527.13149-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/3] avformat/lafdec: Check if all data was read 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="===============7398081305574782502==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7398081305574782502== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bhNkUR2daIEL1A1N" Content-Disposition: inline --bhNkUR2daIEL1A1N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 31, 2023 at 12:21:24PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: OOM > > Fixes: 54572/clusterfuzz-testcase-minimized-ffmpeg_dem_LAF_fuzzer-49740= 38870523904 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/lafdec.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavformat/lafdec.c b/libavformat/lafdec.c > > index d02b479c4d..b78ec3649c 100644 > > --- a/libavformat/lafdec.c > > +++ b/libavformat/lafdec.c > > @@ -208,6 +208,8 @@ again: > > ret =3D avio_read(pb, s->data, st_count * st->codecpar->sample= _rate * bpp); > > if (ret < 0) > > return ret; > > + if (ret !=3D st_count * st->codecpar->sample_rate * bpp) > > + return AVERROR_INVALIDDATA; > > } > > =20 > > st =3D ctx->streams[s->index]; >=20 > ffio_read() I assume you mean ffio_read_size(), will use that thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates --bhNkUR2daIEL1A1N Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY9l5pwAKCRBhHseHBAsP q4tbAJ4jwXKsoOG5Rixm4aG3Te4pV4+qWgCfTUKhTawF6LXl+ckrBYvthzD84so= =u+Xo -----END PGP SIGNATURE----- --bhNkUR2daIEL1A1N-- --===============7398081305574782502== 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". --===============7398081305574782502==--