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 A635140EA4 for ; Wed, 9 Feb 2022 09:36:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2278B68B1EB; Wed, 9 Feb 2022 11:36:41 +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 7B5EF68A906 for ; Wed, 9 Feb 2022 11:36:34 +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 D29B6FF805 for ; Wed, 9 Feb 2022 09:36:33 +0000 (UTC) Date: Wed, 9 Feb 2022 10:36:33 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220209093633.GU2829255@pb2> References: <20220208145318.26969-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/hls: Use unsigned for iv computation 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="===============5299978570927815150==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5299978570927815150== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DFTNOOKgBLCwA/Ya" Content-Disposition: inline --DFTNOOKgBLCwA/Ya Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2022 at 01:55:31PM +0800, Steven Liu wrote: > Michael Niedermayer =E4=BA=8E2022=E5=B9=B42=E6= =9C=888=E6=97=A5=E5=91=A8=E4=BA=8C 22:59=E5=86=99=E9=81=93=EF=BC=9A > > > > Fixes: signed integer overflow: 9223372036854775748 + 60 cannot be repr= esented in type 'long' > > Fixes: 44417/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-58024= 43881971712 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/hls.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > index 4568e72cb2..8541fa9420 100644 > > --- a/libavformat/hls.c > > +++ b/libavformat/hls.c > > @@ -914,7 +914,7 @@ static int parse_playlist(HLSContext *c, const char= *url, > > if (has_iv) { > > memcpy(seg->iv, iv, sizeof(iv)); > > } else { > > - int64_t seq =3D pls->start_seq_no + pls->n_segment= s; > > + uint64_t seq =3D pls->start_seq_no + (uint64_t)pls= ->n_segments; > > memset(seg->iv, 0, sizeof(seg->iv)); > > AV_WB64(seg->iv + 8, seq); > > } > > -- > > 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 > LGTM > not sure int limit number is ok for n_segments, but i have no better > idea for that. > uint64_t here is ok. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope --DFTNOOKgBLCwA/Ya Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYgOLIQAKCRBhHseHBAsP q9/kAJ9DXuIn858wI64NqbYvcwXd9REtDACfVeykecHrJ4qRHSnsXF1RJSPleIw= =JK+H -----END PGP SIGNATURE----- --DFTNOOKgBLCwA/Ya-- --===============5299978570927815150== 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". --===============5299978570927815150==--