From patchwork Wed Aug 7 07:03:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Mandelli X-Patchwork-Id: 50923 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d7b2:0:b0:489:2eb3:e4c4 with SMTP id dc18csp188405vqb; Wed, 7 Aug 2024 00:03:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV23tdkcMTUPRozDpWUF+/INV5bNWUiTq27rgYS/09HieJFl3mkGcewBbUo/k7YFlVpBbhUvVKEVF+wLNHhmAN6hlmZc6RlP8VzVA== X-Google-Smtp-Source: AGHT+IE5ZYhx4rF7PPxDC1IM2y0Ku1Ie6gTlNGV6AUZXRZcq93E26lYjUS5hSJOxmrwkTlP+I3NB X-Received: by 2002:a05:6402:b11:b0:57c:78fb:1a32 with SMTP id 4fb4d7f45d1cf-5b7f40a94ebmr11528952a12.19.1723014194900; Wed, 07 Aug 2024 00:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723014194; cv=none; d=google.com; s=arc-20160816; b=lO12wyXQpMw8QvR44ZLf/hBXZuA5zeHfAlWhq5CmMNU7yvw2RRV7sCQYRKtsEgymXh hSXsLY/+RG8q5BTAx8N+4XuugbvLbILQqsLGED0nUYIBguB101Nvr1RxpnuSCjzP+bMd 8TmT4P4YaqbG24+kzNdhS2yu3p/Ci9sGAU6tADHvAEsilotI1IUfs831mw7qf2p48WHW jHOf6g0ZmD4pxnfluDqDmuyeN3XTGGCic/Iyndi2SH1m/BhBwXwjwl+7t2w7ElSTLS2b NB36UA68ul465d3WF+2umkMY9ft3L3obnhdp7h913SuLB8M21J1M1bu22Zlzqx/EjTsJ AZfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:to:date:from:delivered-to; bh=p+7L99FR+Pe0+XPy9kO2cLXlemNqlOh/X7PlQeGHy6Y=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=tk8B81+96pYqp5yW132ybBJRNg5nLm+TACZ7yhAfWDjmEXzwacEKVJB3L7Nfrpubbw 5qqNUrKxp7Pjielql3dE9kBQloWvd9zTwx9n3v1ycFVXF8X7J11+dqH3pc2Z8C7wEAWG x27iiHVvAUWleS+V6Vm72M+y+KsJJyOWUQFWZsPHuI8yhQEApHfzTzcr7ecTpiJ9NzSd ZhXGJFJQrQjonJNoaYrzQiH4aR7aM7d1GikEngs38yYDTIAh1+uBBpK+oir0JM7PKWUY qwSh/JTLulhfEkM5rjZs2qn/aS0KiFqEbt8UoA2MFumk8PFfBuPv+McFe/8zUR8vCK+m 7FgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5b83c0368e8si6616722a12.433.2024.08.07.00.03.14; Wed, 07 Aug 2024 00:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D99F568D7A9; Wed, 7 Aug 2024 10:03:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from pcteor1.pcteor1.mi.infn.it (pcteor1.mi.infn.it [192.84.139.215]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 01FFA68D7A9 for ; Wed, 7 Aug 2024 10:03:02 +0300 (EEST) Received: from lcm.mi.infn.it (link.pcteor1.mi.infn.it [192.168.0.103]) by pcteor1.pcteor1.mi.infn.it (Postfix) with SMTP id 5558E80815 for ; Wed, 7 Aug 2024 09:03:01 +0200 (CEST) Received: by lcm.mi.infn.it (sSMTP sendmail emulation); Wed, 07 Aug 2024 09:03:01 +0200 From: "Stefano Mandelli" Date: Wed, 7 Aug 2024 09:03:01 +0200 To: ffmpeg-devel@ffmpeg.org Message-ID: <20240807070301.nxz6653ipwtspr3y@nanos8.pcteor1.mi.infn.it> MIME-Version: 1.0 User-Agent: NeoMutt/20170113 (1.7.2) Subject: [FFmpeg-devel] Extend the PATH buffer to 2048 for RTSP 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yivTiiNOEzQv Recently, I have been experiencing an increasing number of user that use ffmpeg to retrive RTSP stream from personal mediaproxies (e.g. MediaMtx) with authorization based on JWT. The current length of PATH does not permit to insert the token in the URL failing the authorization with no possibilities to get the video. VLC has just modified the RSTP max URL length, and it permits to use token inside the URL. For these reasons, I propose this patch to extend the PATH buffer from 1024 to 2048 in order to use tokens and the authorization process based on JWT. diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 19b93df839..d8f45cf8d5 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1727,7 +1727,7 @@ void ff_rtsp_close_connections(AVFormatContext *s) int ff_rtsp_connect(AVFormatContext *s) { RTSPState *rt = s->priv_data; - char proto[128], host[1024], path[1024]; + char proto[128], host[1024], path[2048]; char tcpname[1024], cmd[MAX_URL_SIZE], auth[128]; const char *lower_rtsp_proto = "tcp"; int port, err, tcp_fd;