From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 158834CEE4 for ; Mon, 11 Aug 2025 22:25:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6C9F768CA4C; Tue, 12 Aug 2025 01:25:28 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 3BFE7688FDA for ; Tue, 12 Aug 2025 01:25:22 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7561D430D5 for ; Mon, 11 Aug 2025 22:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1754951121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pAVSzuHTMP0IUtmbWGj6eGoDXbJMJXbwvZW+bb07HhY=; b=a8UqKndw9cJ57YVGqTw1JgZJxh4VwIOlnjyUJ8a9WEo1idAPQnMqmUuJBL5BZ3JCMDUAB9 bt6Op/KWE86yB0zDjMdvPJYW6871YXfEb8JDnM3d0brdmijOpOsTJKUv+pQvosKvQ9ZT1f UL6NsARMA7hE5A+IwaD2S7xzQg8P+nvf6sckTp/yLiIMlaRct5I3z99aRI7dficLNJ9c5L J967Jgqx65f1bdICQ5MQ7a9kOtGx6cYzi4wiozuMOUIDmX9jsvqCK/xUx43CBDWdXHWjVB Aif+Xv2fIyctZ89TJXP6ku5XU8qJvbwpsiuoxS8QlAaZPWxm1aHDLRI9Q5ZhFQ== Date: Tue, 12 Aug 2025 00:25:20 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250811222520.GD29660@pb2> References: <20250808020842.26719-1-jiashengjiangcool@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250808020842.26719-1-jiashengjiangcool@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddufeefieegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] libavutil/tests/lzo: Add check to avoid potential NULL pointer dereference 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="===============2695542211934188465==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2695542211934188465== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WZSemdo9hOtg5m7L" Content-Disposition: inline --WZSemdo9hOtg5m7L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 08, 2025 at 02:08:42AM +0000, Jiasheng Jiang wrote: > Add av_free() if qf_vid is NULL to avoid potential memory leak. >=20 > Fixes: 5d48e4eafa ("Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d19= 6'") > Signed-off-by: Jiasheng Jiang > --- > libavutil/tests/lzo.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/libavutil/tests/lzo.c b/libavutil/tests/lzo.c > index d7a78a1696..89e504601a 100644 > --- a/libavutil/tests/lzo.c > +++ b/libavutil/tests/lzo.c > @@ -45,6 +45,10 @@ int main(int argc, char *argv[]) { > long tmp[LZO1X_MEM_COMPRESS]; > int inlen, outlen; > int i; > + > + if (!in || !orig || !comp || !decomp) > + goto end; > + > av_log_set_level(AV_LOG_DEBUG); > if (comp_level =3D=3D 0) { > lzo1x_1_compress(orig, s, comp, &clen, tmp); > @@ -71,6 +75,8 @@ int main(int argc, char *argv[]) { > av_log(NULL, AV_LOG_ERROR, "decompression incorrect\n"); > else > av_log(NULL, AV_LOG_ERROR, "decompression OK\n"); > + > +end: > fclose(in); this could call flcose(NULL) thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope --WZSemdo9hOtg5m7L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaJptyQAKCRBhHseHBAsP qwhwAJ9MtcJbdmLsxwtFajtFsYx9WhVKwwCfaiWZzDOocNJCFHmKftMWXHbH4zw= =rLRO -----END PGP SIGNATURE----- --WZSemdo9hOtg5m7L-- --===============2695542211934188465== 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". --===============2695542211934188465==--