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 8CD084D0F7 for ; Mon, 30 Jun 2025 01:07:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3A47A68DE3B; Mon, 30 Jun 2025 04:07:42 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 315F768D497 for ; Mon, 30 Jun 2025 04:07:35 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7ECDF41C84 for ; Mon, 30 Jun 2025 01:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1751245654; 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=Hidnyqz7jKGbLUUlmN+hf2xHDmKVSDS0G7ua08dzguU=; b=Mi+ncoNQNnmR+anc/pA8KaK+F8g6YE8YS54Yo8JzGK70XJ6nnDEKWuopldIyDRBl4bkb+p hnfFHxgmaX+mq+KM7OCdo7/ZN4UrLr/mQmrypq9fw9dSP7K4GtkBF98lxTiBcaRToB81BH C3lkXsCuYtMfVbl6c7ULunkKp9E41Z+o7hoA/aOeD8M1B+NEsxe2oX+7CDF0l44pJOXN0i PR6Jtd89FGV+UfHvasY84e2MYJ3MUgyAKRz3qoP3+FdDx3OS4m00XCrwhqewF43wa3pkr3 iS9vao1FGSC87lYSYEp/br/+sjUAjRNaOl12OIeplEsSe2iSlRyRGbxvl+YVmQ== Date: Mon, 30 Jun 2025 03:07:33 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250630010733.GA29660@pb2> References: <20250629064526.2992143-1-502024330056@smail.nju.edu.cn> <20250629064526.2992143-5-502024330056@smail.nju.edu.cn> MIME-Version: 1.0 In-Reply-To: <20250629064526.2992143-5-502024330056@smail.nju.edu.cn> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddutdefgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 4/5] avcodec/sunrast: fix leak in sunrast_decode_frame() 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="===============3164915146142922121==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3164915146142922121== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bc0JH9yMPqZ2P0yV" Content-Disposition: inline --bc0JH9yMPqZ2P0yV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 29, 2025 at 02:45:25PM +0800, Lidong Yan wrote: > In sunrast_decode_frame(), we use av_malloc_array() allocates memory > to ptr and ptr2. However if buf_end - buf < 1, this function returns > error code without freeing this memory thus cause a leak. Add av_freep() > before return. >=20 > Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> > --- > libavcodec/sunrast.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) will apply might be nice to factor this so its freed in a common place thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus --bc0JH9yMPqZ2P0yV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaGHjVQAKCRBhHseHBAsP qzQzAJ99P6mVmuzaYH/OMNC0q23k0+mE+QCeOVqlJb4nF8iyT/MRbnQbXlYTCiE= =mpLP -----END PGP SIGNATURE----- --bc0JH9yMPqZ2P0yV-- --===============3164915146142922121== 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". --===============3164915146142922121==--