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 EF76D4082F for ; Thu, 23 Dec 2021 11:26:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62ACF68B16F; Thu, 23 Dec 2021 13:26:35 +0200 (EET) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 723AE68B125 for ; Thu, 23 Dec 2021 13:26:28 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by relay12.mail.gandi.net (Postfix) with ESMTPSA id BB511200004 for ; Thu, 23 Dec 2021 11:26:27 +0000 (UTC) Date: Thu, 23 Dec 2021 12:26:26 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20211223112626.GH2829255@pb2> References: <20211222124728.7300-1-ffmpeg@gyani.pro> <20211222124728.7300-2-ffmpeg@gyani.pro> <20211222213417.GE2829255@pb2> <8698638f-6bb2-490a-4984-2ac0b5d66364@gyani.pro> MIME-Version: 1.0 In-Reply-To: <8698638f-6bb2-490a-4984-2ac0b5d66364@gyani.pro> Subject: Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/mov: validate box size for stts 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="===============6936055818293236281==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6936055818293236281== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DdODeaPUdQhij6po" Content-Disposition: inline --DdODeaPUdQhij6po Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 23, 2021 at 12:54:58PM +0530, Gyan Doshi wrote: >=20 >=20 > On 2021-12-23 03:04 am, Michael Niedermayer wrote: > > On Wed, Dec 22, 2021 at 06:17:28PM +0530, Gyan Doshi wrote: > > > --- > > > libavformat/mov.c | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > >=20 > > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > > index 7de95b7ab0..1e44c74944 100644 > > > --- a/libavformat/mov.c > > > +++ b/libavformat/mov.c > > > @@ -2969,6 +2969,12 @@ static int mov_read_stts(MOVContext *c, AVIOCo= ntext *pb, MOVAtom atom) > > > avio_rb24(pb); /* flags */ > > > entries =3D avio_rb32(pb); > > > + if (validate_box_size(c, atom, pb, avio_tell(pb)-8, 8+(int64_t)e= ntries*8, 0)) { > > > + av_log(c->fc, AV_LOG_ERROR, "Invalid or incomplete %s box in= stream %d\n", > > > + av_fourcc2str(atom.type), c->fc->nb_streams-1); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > av_log(c->fc, AV_LOG_TRACE, "track[%u].stts.entries =3D %u\n", > > > c->fc->nb_streams-1, entries); > > this breaks playback of > >=20 > > ./ffplay H263_NM_f.mp4 >=20 > Sent revised set. >=20 > However, do we need to allow this? yes its a real world file its not crafted to be funky=20 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes --DdODeaPUdQhij6po Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYcRc3gAKCRBhHseHBAsP q0DwAJ4kphrpiIs4q/WkK+aNu93dEsNWvgCfVsH1Z6ejyjbYzRggpF1bthqIdzI= =ZG1G -----END PGP SIGNATURE----- --DdODeaPUdQhij6po-- --===============6936055818293236281== 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". --===============6936055818293236281==--