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 CA55842611 for ; Mon, 21 Mar 2022 07:31:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D244068B15E; Mon, 21 Mar 2022 09:30:59 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B85568818E for ; Mon, 21 Mar 2022 09:30:53 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 78931FF808 for ; Mon, 21 Mar 2022 07:30:52 +0000 (UTC) Date: Mon, 21 Mar 2022 08:30:51 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220321073051.GJ2829255@pb2> References: <20220320233056.18169-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/5] avformat/hls: Check target_duration 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="===============2189218355776943883==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2189218355776943883== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VfutEKmtQeC2p6Kf" Content-Disposition: inline --VfutEKmtQeC2p6Kf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 21, 2022 at 09:40:46AM +0800, Steven Liu wrote: > Michael Niedermayer =E4=BA=8E2022=E5=B9=B43=E6= =9C=8821=E6=97=A5=E5=91=A8=E4=B8=80 07:31=E5=86=99=E9=81=93=EF=BC=9A > > > > Fixes: signed integer overflow: 77777777777777 * 1000000 cannot be repr= esented in type 'long long' > > Fixes: 45545/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-64381= 01247983616 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/hls.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > index cf6ef9dfb6..a58c558ffe 100644 > > --- a/libavformat/hls.c > > +++ b/libavformat/hls.c > > @@ -819,10 +819,16 @@ static int parse_playlist(HLSContext *c, const ch= ar *url, > > &info); > > new_rendition(c, &info, url); > > } else if (av_strstart(line, "#EXT-X-TARGETDURATION:", &ptr)) { > > + int64_t t; > > ret =3D ensure_playlist(c, &pls, url); > > if (ret < 0) > > goto fail; > > - pls->target_duration =3D strtoll(ptr, NULL, 10) * AV_TIME_= BASE; > > + t =3D strtoll(ptr, NULL, 10); > > + if (t < 0 || t >=3D INT64_MAX / AV_TIME_BASE) { > > + ret =3D AVERROR_INVALIDDATA; > > + goto fail; > > + } > > + pls->target_duration =3D t * AV_TIME_BASE; > > } else if (av_strstart(line, "#EXT-X-MEDIA-SEQUENCE:", &ptr)) { > > uint64_t seq_no; > > ret =3D ensure_playlist(c, &pls, url); > > -- > > 2.17.1 > > > > _______________________________________________ > > 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". >=20 >=20 > lgtm will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control. --VfutEKmtQeC2p6Kf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYjgppwAKCRBhHseHBAsP qxl/AJwLbt/N7wQk7cy9HVQDKmrVELoX1gCdFQeDZGJ3E8D8yHUTVVcd0e46QnE= =WqEb -----END PGP SIGNATURE----- --VfutEKmtQeC2p6Kf-- --===============2189218355776943883== 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". --===============2189218355776943883==--