From patchwork Mon Aug 17 19:21:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?WWnEn2l0IChZZWV0KSBVeWFu?= X-Patchwork-Id: 21694 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 96CD844A707 for ; Mon, 17 Aug 2020 22:46:31 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7033268B847; Mon, 17 Aug 2020 22:46:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 881AA68B7DA for ; Mon, 17 Aug 2020 22:46:25 +0300 (EEST) Received: by mail-il1-f194.google.com with SMTP id p18so11768235ilm.7 for ; Mon, 17 Aug 2020 12:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Khxw6BgJR/rmyRkAcDGnOC3uQ+/EQCREEnBfItMjpu8=; b=KH7Z1WVXOy/Lqy0WbVv6+L4kK1cJr1vZ3+K8PuXkV12DbuF1Q+V6zvBx5Maw37SlpM HjpsvLxdl55LB2PZY3qeWZIVb9XXXKGypAYIj7Zg8AuFyQiIwBYE9FUUu9MnGYHXlKy3 usfRyoXVO6fTrIJasCp8W5JGmp8brYV021A0AnqXs/wLPj5yezUw78knF7AC8MCjto6o AAnCEpd0E2mtO1y3aNnhw7N3quB/5dLIul8JbqzDW19FxZmNEuDpEc9jpt/aeSIOK+IU 7+G3jCn1NHghCHjUSqyzGhsscxDXkx8gNCScjZgA/510NirKdEJR74LeBnPXrjJEXp+f MEtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Khxw6BgJR/rmyRkAcDGnOC3uQ+/EQCREEnBfItMjpu8=; b=menpCM/y+RvhUqzfhF2pkvET4nQNKfDT9ZR+vZSM1pdqmmf5z1AGuikQOidJZO+BJ6 kpKcLhzomNqDEWDedQ6SD7SKq/2brA0AubyfDmpkU1NVCU9JMhus3CpIaWFVNsjq3lqT kB+h1bM5ypkpvu0+0OLAKF6b94R/U9I5jgajQu9cMI6BSYpf6wQy12kBNtmrqdNoqMIr +4wqzzvNQivchE0/zwWx8z0aYy0vOe4HRfyqvyuphiaQ1HOjEXy+5+W56FfjnzddHb6n yHftOs4S0y1GMkpq3ojuarDdQT+pfN8U6J8SSUUJ4PuJuOq4MtUYdVwRHzhin4bW5Z1W ZhAw== X-Gm-Message-State: AOAM533zpL73BQXLRrdTkIVefU657xeNIybKGVGh2KYqUjuCo65UQDlC A6TXmV0g+WkKCVbyjPbIk7QbU6ftNuuRtNb+PIdy8ULlG2k9dQ== X-Google-Smtp-Source: ABdhPJw5vDJizckyYX1jH460Ff3IjphHlG95RI2Olw99OhkC9xOEzomumKgAgMRsDBaN1O/+KwMjEi1Zxi23KS+yfPc= X-Received: by 2002:a05:6e02:962:: with SMTP id q2mr15388351ilt.171.1597692122918; Mon, 17 Aug 2020 12:22:02 -0700 (PDT) MIME-Version: 1.0 From: =?utf-8?b?WWnEn2l0IChZZWV0KSBVeWFu?= Date: Mon, 17 Aug 2020 12:21:46 -0700 Message-ID: To: ffmpeg-trac@avcodec.org X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] RTSP Video Stream - Buffer Overflow! X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi everyone, RTSP/S links longer than 1024 characters are failing due to a buffer overflow issue happening when parsing RTSP links (eg. ffplay ). FFmpeg has a buffer definition in libavformat/Rtsp.h, where it defines the control_uri as 1024 characters. RTSP/S links follow a similar pattern to common web URIs, i.e. , and in many cases these links are generated, routed and modified by common underlying web infrastructure. The common conception for the web when parsing a URI is to expect up to 2000 characters. https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers The link above is for browsers, but it is very similar in many other web technologies as well. Can somebody help with extending the rtsp/s link limit to match the web urls (eg. 2048 characters) Thanks in advance, I have created and submitted the following patch to ffmpeg-devel@ffmpeg.org, though it does not show up in patchwork. I am not sure what the following steps are.. Signed-off-by: Yiğit (Yeet) Uyan --- libavformat/rtsp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 54a9a30c16..2b37f5b49f 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -315,7 +315,7 @@ typedef struct RTSPState { /** some MS RTSP streams contain a URL in the SDP that we need to use * for all subsequent RTSP requests, rather than the input URI; in * other cases, this is a copy of AVFormatContext->filename. */ - char control_uri[1024]; + char control_uri[2048]; _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org