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 7C26643268 for ; Thu, 26 May 2022 08:41:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C3DE168B553; Thu, 26 May 2022 11:41:26 +0300 (EEST) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC43168B34F for ; Thu, 26 May 2022 11:41:20 +0300 (EEST) 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 CBA88240006 for ; Thu, 26 May 2022 08:41:19 +0000 (UTC) Date: Thu, 26 May 2022 10:41:18 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220526084118.GA396728@pb2> References: <20220519234312.11733-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/matroskadec: assert non NULL buf 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="===============6976625485555690714==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6976625485555690714== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IJKqlw44nclc26Ih" Content-Disposition: inline --IJKqlw44nclc26Ih Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 20, 2022 at 09:17:50AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > The code is only called if size is > 0 so buf should not be NULL > >=20 > > Helps: CID610554 > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/matroskadec.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > > index 4715f1b7d4..de73f97aca 100644 > > --- a/libavformat/matroskadec.c > > +++ b/libavformat/matroskadec.c > > @@ -3701,6 +3701,8 @@ static int matroska_parse_block(MatroskaDemuxCont= ext *matroska, AVBufferRef *buf > > uint64_t num; > > int trust_default_duration; > > =20 > > + av_assert1(buf); > > + > > ffio_init_context(&pb, data, size, 0, NULL, NULL, NULL, NULL); > > =20 > > if ((n =3D ebml_read_num(matroska, &pb.pub, 8, &num, 1)) < 0) >=20 > Ok. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides --IJKqlw44nclc26Ih Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYo89KgAKCRBhHseHBAsP q3adAJ98VcQzetnikc+IPDYZmsyobbhhPwCfcKc7zh9D27Z3zthgVLRUkl95oo4= =6Lt+ -----END PGP SIGNATURE----- --IJKqlw44nclc26Ih-- --===============6976625485555690714== 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". --===============6976625485555690714==--