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 E15F540EB0 for ; Wed, 9 Feb 2022 09:43:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D77C368B228; Wed, 9 Feb 2022 11:43:10 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E72F68B06F for ; Wed, 9 Feb 2022 11:43:04 +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 3EC44C0002 for ; Wed, 9 Feb 2022 09:43:02 +0000 (UTC) Date: Wed, 9 Feb 2022 10:43:02 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220209094302.GV2829255@pb2> References: <20220205195304.14816-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/matroskadec: Check desc_bytes 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="===============3788099401370168575==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3788099401370168575== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YSmaNVal/jyW4jWA" Content-Disposition: inline --YSmaNVal/jyW4jWA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 05, 2022 at 10:58:28PM +0100, Andreas Rheinhardt wrote: > Andreas Rheinhardt: > > Michael Niedermayer: > >> Fixes: Division by 0 > >> Fixes: 44035/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIF= EST_fuzzer-4826721386364928 > >> > >> Found-by: continuous fuzzing process https://github.com/google/oss-fuz= z/tree/master/projects/ffmpeg > >> Signed-off-by: Michael Niedermayer > >> --- > >> libavformat/matroskadec.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > >> index 5a9acfb247..f433391a16 100644 > >> --- a/libavformat/matroskadec.c > >> +++ b/libavformat/matroskadec.c > >> @@ -4216,6 +4216,8 @@ static int64_t webm_dash_manifest_compute_bandwi= dth(AVFormatContext *s, int64_t > >> do { > >> int64_t desc_bytes =3D desc_end.end_offset - desc_beg= =2Estart_offset; > >> int64_t desc_ns =3D desc_end.end_time_ns - desc_beg.s= tart_time_ns; > >> + if (desc_bytes <=3D 0) > >> + return -1; > >> double desc_sec =3D desc_ns / nano_seconds_per_second; > >> double calc_bits_per_second =3D (desc_bytes * 8) / de= sc_sec; > >> =20 > >=20 > > This should give a declaration-after-statement error. > >=20 >=20 > s/error/warning/ will split the declaration for the double and move them up thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin --YSmaNVal/jyW4jWA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYgOMpgAKCRBhHseHBAsP q8t1AJ4tTF9lNwwovUt7UkOQUl2GtdFzGACffpDTTfnAzEZb1v+reBAJs8RdAbQ= =70Vx -----END PGP SIGNATURE----- --YSmaNVal/jyW4jWA-- --===============3788099401370168575== 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". --===============3788099401370168575==--