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 B8DB44077C for ; Wed, 22 Dec 2021 21:34:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9717F68B08C; Wed, 22 Dec 2021 23:34:25 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39E4068A2B2 for ; Wed, 22 Dec 2021 23:34:19 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 5B9A8E0003 for ; Wed, 22 Dec 2021 21:34:18 +0000 (UTC) Date: Wed, 22 Dec 2021 22:34:17 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20211222213417.GE2829255@pb2> References: <20211222124728.7300-1-ffmpeg@gyani.pro> <20211222124728.7300-2-ffmpeg@gyani.pro> MIME-Version: 1.0 In-Reply-To: <20211222124728.7300-2-ffmpeg@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="===============0759721940649761030==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0759721940649761030== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nbpXQHe8gn9lDJHm" Content-Disposition: inline --nbpXQHe8gn9lDJHm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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, AVIOContex= t *pb, MOVAtom atom) > avio_rb24(pb); /* flags */ > entries =3D avio_rb32(pb); > =20 > + if (validate_box_size(c, atom, pb, avio_tell(pb)-8, 8+(int64_t)entri= es*8, 0)) { > + av_log(c->fc, AV_LOG_ERROR, "Invalid or incomplete %s box in str= eam %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); > =20 this breaks playback of =2E/ffplay H263_NM_f.mp4 i presume its this file here: https://samples.ffmpeg.org/F4V/H263_NM_f.mp4 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Nations do behave wisely once they have exhausted all other alternatives.= =20 -- Abba Eban --nbpXQHe8gn9lDJHm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYcOZ1QAKCRBhHseHBAsP q1i8AKCHMTCGwJFEotnTL5m6mYoBBf9dJgCeNLqfmOmN90jXdGm4TXK05ev4dYY= =w2t1 -----END PGP SIGNATURE----- --nbpXQHe8gn9lDJHm-- --===============0759721940649761030== 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". --===============0759721940649761030==--