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 2CAB744DC9 for ; Mon, 26 Dec 2022 21:40:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D70B068BBC9; Mon, 26 Dec 2022 23:40:06 +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 13BB168B7FA for ; Mon, 26 Dec 2022 23:40:01 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 2DACCFF806 for ; Mon, 26 Dec 2022 21:39:59 +0000 (UTC) Date: Mon, 26 Dec 2022 22:39:59 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221226213959.GM3806951@pb2> References: <20221225220323.20968-1-michael@niedermayer.cc> <20221225220323.20968-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/2] avformat/mxfdec: Use 64bit in remainder 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="===============7524947206928016779==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7524947206928016779== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IB/7nB5ie+9rgeRN" Content-Disposition: inline --IB/7nB5ie+9rgeRN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 26, 2022 at 11:11:46AM -0300, James Almer wrote: > On 12/25/2022 7:03 PM, Michael Niedermayer wrote: > > Fixes: signed integer overflow: 48000 * 223587 cannot be represented in= type 'int' > > Fixes: 54513/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-58175= 94836025344 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/mxfdec.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > > index e6118e141d..6150c131ec 100644 > > --- a/libavformat/mxfdec.c > > +++ b/libavformat/mxfdec.c > > @@ -3857,8 +3857,8 @@ static int64_t mxf_compute_sample_count(MXFContex= t *mxf, AVStream *st, > > if ((sample_rate.num / sample_rate.den) =3D=3D 48000) { > > return av_rescale_q(edit_unit, sample_rate, track->edit_rate); > > } else { > > - int remainder =3D (sample_rate.num * time_base.num) % > > - (time_base.den * sample_rate.den); > > + int64_t remainder =3D (sample_rate.num * (int64_t)time_base.nu= m) % > > + (time_base.den * (int64_t)sample_rate.den); >=20 > Don't undo the vertical alignment, please. Will apply it with maximal vertical alignment thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus --IB/7nB5ie+9rgeRN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY6oUpwAKCRBhHseHBAsP qzv3AJkBlOcJZ7xmWkL82a2o9/6CU5QSjACcDFi/iTgcoqIj/Wdk1gfTe54huns= =qTL+ -----END PGP SIGNATURE----- --IB/7nB5ie+9rgeRN-- --===============7524947206928016779== 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". --===============7524947206928016779==--