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 1778D4DF9F for ; Fri, 9 Jan 2026 02:06:15 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'jORSK7Hr2Hw5e5fq4nvNKoPg52TFa5z2+0JmaSqn1uc=', expected b'Z2ccXFiI8IKqJ1DZgOsDpMUFdCW8tRKQqILld63GyOA=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767924355; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=Rl6fXvG08D+ooEZ21te3r+28BlAV9sBBUfqQVGbFMM4=; b=kmpyZvIqJ1sS4PZaHU4kjopU+CFbtHf2FsCVywPmvltlXtufI0SkUYpw23bXXlWz3dylA aOd3qNMXwK1vGRRvAV0n+ofhsamf+6TXFCEGSHEnWXRe/vL34W9KNbpIGi8LxE2PaD4S39p 9Ugsz0rKC0qK43/ZMbxs7r7MXo/LtbvlvB8Kx3rVkiTIaoJavm0HACZk12PPbWakNZAAMvg TKXb5nnHP+6ojl0l32Fb92E1aUW55ZRT8chSe+fGk1DtTEK0OjnE7pDKCxfU9xBmLvG/Q4U eF0i2ItXkUKItcVQKKp2guaGh7cC3xWOJBeeZdJ7dlD8As0aKz9EQg8nbr0Q== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id AE805690D62; Fri, 9 Jan 2026 04:05:55 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767924340; b=HBX4Bkd2AOFktr83/b0PV6/g2CpFX0ePPw47S6YH5uvHecEq/e7DvXSfgIQzuRPPvCS2X zKvLAQoVQzPK2ZwViZDUJiQWluwsO4SNzOvgKoIGGeXCj0iZTEEL0hVNqwrv237LhnxrA+7 +YFkGwWeipMKlpqSCU7B/rkwr67cyIApOEaKoCoinpPbyFcL/ORAjnxRjWm95sGlQkb2chb nj7NzZW8Zb47UFecHPQZa6EbEQCLNGYn+2fSWw6ZWVkc7l77p+7TGU5ZLVKJVtG4bd1uyyo bdfj5QfPGmKD4uShaX7HoUkiqsh4u3lgnH9iTx4bo80e5EHX9RZkbqtmCNPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767924340; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=jORSK7Hr2Hw5e5fq4nvNKoPg52TFa5z2+0JmaSqn1uc=; b=saJ1v1xNCU2z7jfJyrHtDi6MQ4N7G5tAMr2imFk03bcOw63QWEs7SlGOQ93Vj2/+405qL 08xowGz3Y8YMzfKrUYJXxchihEvSHIO0DvZOlIJgMYD22ZnkHyktMtqF7mSKhYnkszuR84j r/9jtEDwzOhlsgppWA91QB2TfVOJKjpWU68jObLR5PqH13cz77owFhMKH7acxxbPxT6uddf 8pbI01fSvQpeaPsY/VPoydd8rw8vAi3KwtXwiJoxso1IFSM9oUA10bZ/SyhWBPc2uC/tQFe TCnNXpJD9SMYKovSz69vZ8KD1AdR1x1ZKXarii7mkW68yPu/fgf3jorSimlA== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 1A150690D67 for ; Fri, 9 Jan 2026 04:05:27 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B2EF4425A for ; Fri, 9 Jan 2026 02:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1767924326; 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=Z2ccXFiI8IKqJ1DZgOsDpMUFdCW8tRKQqILld63GyOA=; b=fNaAUHMdJ7nPktY1S0xah+XYdGhulfuK7AIN8OiThVxD6m5k2gmyWoObxTncYaErTjksCr 39s2Bcgs+Y3oVAMJcVje/M9zCyRQzWoj/7E+rMiYUKM9lmr3/Um2s5hcqT1yUjmJ3QUmcS ArSn2PwB6mGvJESlr2qSiR2rg1iTMkwjfxCFkZr/fRsqllzKMJy74dC8GMwGrorWDrUZmj X0bWCAWKcNEWq8KvdITg9oIKeYQEgWUrLHb5cWdvbQe4JUHv8YIz5EoqG2rg3H2SYY7JxB /SZ8rIEchzSUk5j5wJLn+qqpxgInshDumDmeMAmRbV4fyZ1i3RAAn4S1bxWMhw== Date: Fri, 9 Jan 2026 03:05:23 +0100 To: FFmpeg development discussions and patches Message-ID: References: <20260105011147.752-1-monsterbat02@gmail.com> <20260105011147.752-3-monsterbat02@gmail.com> MIME-Version: 1.0 In-Reply-To: <20260105011147.752-3-monsterbat02@gmail.com> X-GND-Sasl: michael@niedermayer.cc X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdejheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieeirdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeiiedrhedtpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpqhhiugepudeuvdfghfeggedvheetpdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-State: clean X-GND-Score: -85 Message-ID-Hash: 7LH2SSAVRM6E5JR2ZUZZI2UF3UANZ62M X-Message-ID-Hash: 7LH2SSAVRM6E5JR2ZUZZI2UF3UANZ62M X-MailFrom: SRS0=t8x0=7O=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] doc/examples/filter_audio: fix memory leak and duration overflow List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============7218737148975632148==" Archived-At: List-Archive: List-Post: --===============7218737148975632148== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YKnP2DpdnxPGBudW" Content-Disposition: inline --YKnP2DpdnxPGBudW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi 0xBat On Mon, Jan 05, 2026 at 02:11:43AM +0100, 0xBat via ffmpeg-devel wrote: > Ensure filter_graph is freed on error and validate duration input to prev= ent integer overflow. if you have t o write "and" in the commit message, thats generally a sign that there are 2 independant changes that would be clearer in 2 commits >=20 > Signed-off-by: 0xBat > --- > doc/examples/filter_audio.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/doc/examples/filter_audio.c b/doc/examples/filter_audio.c > index ad77bf1f89..bb88f4571b 100644 > --- a/doc/examples/filter_audio.c > +++ b/doc/examples/filter_audio.c > @@ -88,6 +88,7 @@ static int init_filter_graph(AVFilterGraph **graph, AVF= ilterContext **src, > abuffer =3D avfilter_get_by_name("abuffer"); > if (!abuffer) { > fprintf(stderr, "Could not find the abuffer filter.\n"); > + avfilter_graph_free(&filter_graph); > return AVERROR_FILTER_NOT_FOUND; > } > =20 > @@ -279,6 +280,10 @@ int main(int argc, char *argv[]) > } > =20 > duration =3D atof(argv[1]); > + if (duration > (double)2147483647 / INPUT_SAMPLERATE) { hardcoded arbitrary number instead of the named identifer used below > + fprintf(stderr, "Duration too long\n"); > + return 1; > + } > nb_frames =3D duration * INPUT_SAMPLERATE / FRAME_SIZE; [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf --YKnP2DpdnxPGBudW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaWBiXAAKCRBhHseHBAsP q+aOAJ9+6s66+NNkbozE1Oh+BFXFJoPzDgCgihgV90xS+P58X6l5wTXF1Yupbzc= =m7yf -----END PGP SIGNATURE----- --YKnP2DpdnxPGBudW-- --===============7218737148975632148== 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 To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============7218737148975632148==--