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 9AF7740F9A for ; Mon, 14 Mar 2022 13:59:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4133868AFB7; Mon, 14 Mar 2022 15:59:24 +0200 (EET) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8C5F68A717 for ; Mon, 14 Mar 2022 15:59:17 +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 1F51220000E for ; Mon, 14 Mar 2022 13:59:16 +0000 (UTC) Date: Mon, 14 Mar 2022 14:59:16 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220314135916.GX2829255@pb2> References: <20220312235227.19626-1-michael@niedermayer.cc> <20220312235227.19626-4-michael@niedermayer.cc> <2357a96e-862e-3328-4d9b-9ca1c596edd@passwd.hu> MIME-Version: 1.0 In-Reply-To: <2357a96e-862e-3328-4d9b-9ca1c596edd@passwd.hu> Subject: Re: [FFmpeg-devel] [PATCH 4/4] avformat/mxfdec: Do not clear array in mxf_read_strong_ref_array() before writing 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="===============5875168675637296262==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5875168675637296262== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LgegYqCA6mzyJoNK" Content-Disposition: inline --LgegYqCA6mzyJoNK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 13, 2022 at 04:53:29PM +0100, Marton Balint wrote: >=20 >=20 > On Sun, 13 Mar 2022, Michael Niedermayer wrote: >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/mxfdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > > index 828fc0f9f1..f088712494 100644 > > --- a/libavformat/mxfdec.c > > +++ b/libavformat/mxfdec.c > > @@ -941,7 +941,7 @@ static int mxf_read_strong_ref_array(AVIOContext *p= b, UID **refs, int *count) > > *count =3D c; > >=20 > > av_free(*refs); > > - *refs =3D av_calloc(*count, sizeof(UID)); > > + *refs =3D av_malloc(*count * sizeof(UID)); >=20 > I suggest av_malloc_array(), even if it can't overflow because of earlier > checks. agree, will change that thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "You are 36 times more likely to die in a bathtub than at the hands of a terrorist. Also, you are 2.5 times more likely to become a president and 2 times more likely to become an astronaut, than to die in a terrorist attack." -- Thoughty2 --LgegYqCA6mzyJoNK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYi9KNAAKCRBhHseHBAsP q06PAJsFsMlWUOPbbQaw+KtSJiEeGetyLgCbBVgFJFQK1F3JrSGLF1z25Qc54aE= =KM6v -----END PGP SIGNATURE----- --LgegYqCA6mzyJoNK-- --===============5875168675637296262== 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". --===============5875168675637296262==--