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 BCA1B4D0DF for ; Mon, 10 Nov 2025 00:25:17 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'tBlSZnGYrS3enIaJmrZybbQgR9TYhXnfOOX3pvSuApU=', expected b'sGKSrF3+oMJEJb5cYjRkzbj18ynxY23obA/juPgoQPw=')) 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=1762734309; 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=L/ZAZ/RVU6OZorrMz9Mj16v5AflW3AgUekkR7Rhotwk=; b=pbN1cFV81Z3AgKbYwCit3+Ftr7GKgVBOwEuJLA+WZoAqPga7XXsiwGvBnxqiBTSCkVX3S 4E3evQ720B1zWLWHhnmy3epeBfqjd9Uv5p2s2ZMXtI+dhYTkblSXoo2ybONZupx2MYTjHtv NgwXweN+A5FaFr0HW0G+EE98dZlZ5P8+Ngc+A41qYAgNEWp0+ON+1XY+3Aarse4UnzxJmPq D/deTcrHgg3wxbj39zqZltsVKRz/Vwvblsh9L7d/KDqKJ3ZgzVlegqUHRxMmOGzuXvqzOyU zFqSEDJ8eH0eHmzC1J/DOmGn0Gx/Qa1GSsuQAhHiscjtIMF4h6XJXMOMLS4g== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 447E968FBEA; Mon, 10 Nov 2025 02:25:09 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1762734288; b=jcJMqWEGILWM2UtseYXV4FGNALf2BjAn1E9RH5vEuoQFhyRUasz0mljcu6KairzGdEDuh 3EpAU06VkHTLxM4I9AquLM6/Bf+3KFG9aJvW6GJTUAmDTS2p/l/f9AKmTnUepUBrGEPwhRL tGE73r58gbWFLv9YQeyhVqlVHmBB9RSK942Fwu/Uc5rozADPBpkxdg4SKmqJMCKSj7nMQcW h8XjRvEVzpzZrb2L9eiLfRu58PjzFGdA61DrgbjsxV98BX6CDtZxCMBiVyI1QAD2oHJysHG DQdV9erFb++4lEzuoeYd7td7okXXqwToLWv24yRUTf2jSD7O8WA49r+olLVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1762734288; 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=tBlSZnGYrS3enIaJmrZybbQgR9TYhXnfOOX3pvSuApU=; b=gYj5Wch+o2Ckn6NVbLM3uT4Ijmpkhuq5cSC2zGWohMI/JOGJXzvwAA4l3nzY0k9Dh3+DS cY44HKvynQ+FjVMwt785QZUYiUjd7VyuXLbl6qafmzV26ZLu0PRato3X+19/HlPCHNLUpFg R4idiL++TOp/xqW0EqcugF1tBlK21eXzfsJs2Kj0w1+JOdLZN/mzy4lW5pBKVTTQx8HRJ8P gAHCgBc80U9qAjuDe52/hCdaYZ4s4QFxqqtwEDTMUmAQG7TSMyPHSrlWJyxRPAFN+7yHeVc dmPGh9tf27KG2XTD7sqg8uwleTYNZDRtqFSriumWHU+Fz1sSYPm1uqJ44UmQ== 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 04F5D68D500 for ; Mon, 10 Nov 2025 02:24:33 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 37F0A432C2 for ; Mon, 10 Nov 2025 00:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1762734273; 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=sGKSrF3+oMJEJb5cYjRkzbj18ynxY23obA/juPgoQPw=; b=YIzwNqEKrlbw/1hkPMqAcgAGPm46woWhVnNFfSzsEzQfJ+stPF4hWaCAImcXBxRYswKlXn ej6MwRWxh9Hrq1o6no+Ed4s0RWS2a7AmQSCBEEhV3/egYtls25yqJihXijUICJEQsfdd8s KSO38ocjDt0FM91QGn5wcB1kZqw36dhxnaKdhk7BClwRLOPCD4U64yztJhoyL78qdd0P26 +/Yu7eN43LOxD6FVu6x4hNNt6lQYl6fpSrxzVxk1l9qV5TIo7NXLn9gdRRVm7egpe1RcI/ GVNJ7ZMZfv7Or/7R8uIazzBcbXhwuKODRzTRZ12UGQnxoH7lDATkTrRLNGXv9A== Date: Mon, 10 Nov 2025 01:24:32 +0100 To: FFmpeg development discussions and patches Message-ID: References: <176193037214.25.14686032640135071484@2cb04c0e5124> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -90 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduleeikeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculddutddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeffledtfeevfeffheeuuefhtdejieelueeftdeitdfgheetgefffeefteekffdthfenucffohhmrghinhepfhhfmhhpvghgrdhorhhgnecukfhppeeguddrieeirdeiiedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirdehtddphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Message-ID-Hash: BFYNY5XQSYB2RPAT3K2BCT4W2QIOSPA2 X-Message-ID-Hash: BFYNY5XQSYB2RPAT3K2BCT4W2QIOSPA2 X-MailFrom: SRS0=w08+=5S=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] avformat/whip: Fix rtp_ctx->streams access (PR #20805) 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="===============1114366744033822340==" Archived-At: List-Archive: List-Post: --===============1114366744033822340== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Gq2Hbv5XpgrKytdZ" Content-Disposition: inline --Gq2Hbv5XpgrKytdZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Kieran On Sat, Nov 01, 2025 at 02:37:45AM +0000, Kieran Kunhya via ffmpeg-devel wr= ote: > On Fri, 31 Oct 2025, 17:06 michaelni via ffmpeg-devel, < > ffmpeg-devel@ffmpeg.org> wrote: >=20 > > PR #20805 opened by michaelni > > URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20805 > > Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20805.patch > > > > Fixes: out of array access > > No testcase > > > > Found-by: Joshua Rogers with ZeroPath > > Signed-off-by: Michael Niedermayer > > > > > > >From e01eb935a6b919d0bc4361e30a0ab00ff01783af Mon Sep 17 00:00:00 2001 > > From: Michael Niedermayer > > Date: Fri, 31 Oct 2025 18:00:11 +0100 > > Subject: [PATCH] avformat/whip: Fix rtp_ctx->streams access > > > > Fixes: out of array access > > No testcase > > > > Found-by: Joshua Rogers with ZeroPath > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/whip.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/libavformat/whip.c b/libavformat/whip.c > > index a11fffb9c6..6a9b208f69 100644 > > --- a/libavformat/whip.c > > +++ b/libavformat/whip.c > > @@ -1592,8 +1592,8 @@ static int create_rtp_muxer(AVFormatContext *s) > > * therefore, we deactivate the extradata detection for the RTP > > muxer. > > */ > > if (s->streams[i]->codecpar->codec_id =3D=3D AV_CODEC_ID_H264)= { > > - av_freep(&rtp_ctx->streams[i]->codecpar->extradata); > > - rtp_ctx->streams[i]->codecpar->extradata_size =3D 0; > > + av_freep(&rtp_ctx->streams[0]->codecpar->extradata); > > + rtp_ctx->streams[0]->codecpar->extradata_size =3D 0; > > } > > > > buffer =3D av_malloc(buffer_size); > > >=20 > Both the original code and the fix are weird. I agree, a better fix is welcome, but until then, this fix was approved by = 3 people including the author of teh whip code. And it fixes the out of array access fixing the weirdness is out of the scope of this fix. thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable --Gq2Hbv5XpgrKytdZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaREwuQAKCRBhHseHBAsP q+JvAKCLY0228Q38mKMUUjGGOroWYDNHSACeOlJ2xAiaelZ9A4vWRKqwb/C2218= =1Vwx -----END PGP SIGNATURE----- --Gq2Hbv5XpgrKytdZ-- --===============1114366744033822340== 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 --===============1114366744033822340==--