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 EEA6647B21 for ; Fri, 1 Dec 2023 23:24:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1EB1468CC59; Sat, 2 Dec 2023 01:24:32 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2979F68CB33 for ; Sat, 2 Dec 2023 01:24:25 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id B18461BF204 for ; Fri, 1 Dec 2023 23:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1701473063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S23Ll2nLlC03azPxK6I0nEBBW8ErY8vaTDiw+Hr4K7k=; b=Wmd+Y+Ht3Ot6Pu7MsJeafj/HMnl5L0sTQ8LiaN0/8cnXvClil+B+ngGyZdvmcf0+XLmwrV X19rOzYD8cP4ZQexh2AucvDepZWG5slELa4xoz3Ivvu8D2s/9Li9dm3apDwy7CbP+ahPFV NRFvGTQLtvCWBv+kIQc9yvC9lpA8uENhsLDCdmFOkROLZg1YhMtqJS2c+Ry6B2or5dtHkl dlvlYqxrAATFF6EwpURDwvnNmpfn8eToImPjG20UFiXOYfeJ/0Ptycwab6p5HUcD0pKQCw yPU6yIVRg6yg7DtXgxklDv9kuykO/hfaP06i86tycNw/2Y4e78Ij1YPm4xDetw== Date: Sat, 2 Dec 2023 00:24:22 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231201232422.GS3543730@pb2> References: <20231124233825.GJ3543730@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] Fix integer overflow in mov_read_packet(). 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="===============7547006177084136782==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7547006177084136782== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/5AvWNMEsAk3EZ0b" Content-Disposition: inline --/5AvWNMEsAk3EZ0b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 01, 2023 at 10:52:21AM -0800, Dale Curtis wrote: > On Fri, Nov 24, 2023 at 3:38=E2=80=AFPM Michael Niedermayer > wrote: >=20 > > On Wed, Nov 22, 2023 at 02:20:59PM -0800, Dale Curtis wrote: > > > Fixes https://crbug.com/1499669: > > > > > runtime error: signed integer overflow: 9223372036853334272 + 1375731= 456 > > > > this looks a bit close to AV_NOPTS_VALUE but its not actually that close > > >=20 > Yes I originally thought the same thing! >=20 >=20 > > > > > > > cannot be represented in type 'int64_t' (aka 'long') > > > > > > Signed-off-by: Dale Curtis > > > --- > > > libavformat/mov.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > > index 93f202d204..425ddc6849 100644 > > > --- a/libavformat/mov.c > > > +++ b/libavformat/mov.c > > > @@ -9023,7 +9023,7 @@ static int mov_read_packet(AVFormatContext *s, > > AVPacket *pkt) > > > pkt->flags |=3D AV_PKT_FLAG_DISCARD; > > > } > > > if (sc->ctts_data && sc->ctts_index < sc->ctts_count) { > > > - pkt->pts =3D pkt->dts + sc->dts_shift + > > sc->ctts_data[sc->ctts_index].duration; > > > + pkt->pts =3D av_sat_add64(pkt->dts, av_sat_add64(sc->dts_shi= ft, > > sc->ctts_data[sc->ctts_index].duration)); > > > /* update ctts context */ > > > sc->ctts_sample++; > > > if (sc->ctts_index < sc->ctts_count && > > > > This is probably ok > > alternatively pts could be set to AV_NOPTS_VALUE if its unrepresentable > > >=20 > I defer to you. Either is fine with me. Let me know if you'd like me to > change it. ill apply the original patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus --/5AvWNMEsAk3EZ0b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZWprIgAKCRBhHseHBAsP q+wnAJ9l3G0XJX9bKsf6A725QvyJYuzgowCfeR2KQbLyvjqRnTrOYI6QUbC9dfE= =rewh -----END PGP SIGNATURE----- --/5AvWNMEsAk3EZ0b-- --===============7547006177084136782== 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". --===============7547006177084136782==--