From patchwork Sun Dec 5 14:26:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31979 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp3324424iog; Sun, 5 Dec 2021 06:27:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwf0ip2wupVY8KRdSHvNp+UWXdwk0SXMjpfvzvlkC2wsZzPxAH1THdQzgchbTSLtJdz+yg5 X-Received: by 2002:aa7:d652:: with SMTP id v18mr44776556edr.68.1638714462215; Sun, 05 Dec 2021 06:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638714462; cv=none; d=google.com; s=arc-20160816; b=ZYXb9JMQJDXrLruzze9BX9OagYsEtI2+D8z2WTJY+yPrxbfMEU2eDrGmUXjKuL98Dy iauLOH+Au47Jc7VjyEw/5Qq/kw0SqgkrjSJfrt5SPqkUUqrSFEsU0pIlgSgz4t9+Vclc 0Rve424hIhUgJcLn6lSqm0q0cx/kj2WrreFf2meDb/kBrm0oCsq68WcCM4nu622R9nVk Rn6WTns94d4H2yrZZ5RzQFqT8h5VGoysTbqKupoEXyASnEHgGJSh6Lu07tBg4SPYQZGU sHWTSQTBttpfi2TCAqG7MNeZgJL8OJOkFe0/qZt2ItslEHKoXDFGcvJSYiaIoFOf/Ncf qgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=cZY/oYQvDP0p5K96I4M33Xfl3hRKA5Jc+iLZIAqDAUs=; b=AR5KZBXYmpvW2DNzZ9tHHh9+aVjYsLKRtQmxSMraJqRMauxQteaNbfi6AW3K4kUEZM lHP8fnAYKUeO8avIbXLUUhHkOaZzBLm39ZR97eXitnLiqanoIabFuB7zV0XrMbx3qnz/ giKyVBoOqsr5Zz8+1vfZM+Z+QGj+75qUDlX5OZaHh2NLiv5CWZEuna1VDmot4v3AB/H3 fz+CF14mdY7r9h/99HaRiQyr3RoDL73nMZ7Z9oMyJ0iiM96Vz+UmvRR3pNAVFYL5TZpt uG2AqXp55PsA057Cxg+1jMKxmFktpSgHKxJ9PKRZKKPfU7NFPic06m467VQt8BqDP/39 S1sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=AsR5sBfo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l7si5641699ejk.686.2021.12.05.06.27.41; Sun, 05 Dec 2021 06:27:42 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=AsR5sBfo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAAE568AE46; Sun, 5 Dec 2021 16:26:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D081689D92 for ; Sun, 5 Dec 2021 16:26:51 +0200 (EET) Received: by mail-pl1-f176.google.com with SMTP id m24so5357612pls.10 for ; Sun, 05 Dec 2021 06:26:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I/cHeM9lpiG3WTIq7xByBBjBEMKc125p79tpY7DNYuM=; b=AsR5sBfoAC8feiMb26Z4QE2uoELv5kSiOHRnADUYazukb3T071ydqzOjGcdgEmNMxc INL5R6QlKp5DfX2cxJq/7zsL+N9e+jKouTm3WyLokjc65aS+Z/AK58HXpcAjlIrEa+sz Qud5bkRk/IyP/xQbaEbjPGJMNyewW+TMH7siSJWWuzx+vnl/0xxe/DfoUYLb9VjXhJVg s2FUJIj+XKbC+46R1Bkn/2zpXox1ThzZu5Y0U1RgjijuEFTQqcFtJcAPrzTwDz1C2l2b gfJPMES5OBttOG7ISCG3ZQ4vNRw5f+mcOycBLa9arl0VRsEqaWAnEPKcOZxxqBniJH/E Awdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I/cHeM9lpiG3WTIq7xByBBjBEMKc125p79tpY7DNYuM=; b=i2eHMckpOXhdOA6CZRsLDCnurpETnswXctGP+xpG7Ee8va3QtC/PnGE7jHndwHi+jv YZcj4KKVBRl/aKcSqJrkyNYqo5+FV+Xpxzya8HO1ZRFy12fl2tb+TmCDvQ6HanIVxxfY No75hD41vTK2E5jbnIvwits+jDMjYOxwSnn4OUr2I6SLJvi0bt3Y7BKZ0dnlwcqEGHrw P96QO/SVrkzonz2IuR8ourl9ogYrNs1ipOo5bT9JNJ4TPvscZqzo44WuYIMeUPRUqDog ZMFXZcnWy4j/UEdzwgdj38BKjKEVFZ0hc1u7jPunhUDIRVePbAhUvdtM95MVl0oGVM4m syLw== X-Gm-Message-State: AOAM532u4coR06qpsAnmTuzLDbUVXnAkxZGEjX3iyadTgY/Ut89Vrx65 9z4flYWASfMyRe/4RJ/pVE7BPg0n4Go= X-Received: by 2002:a17:90b:3890:: with SMTP id mu16mr29775877pjb.186.1638714409484; Sun, 05 Dec 2021 06:26:49 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id x9sm10192265pjq.50.2021.12.05.06.26.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Dec 2021 06:26:49 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 5 Dec 2021 22:26:35 +0800 Message-Id: <1638714396-23062-5-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638714396-23062-1-git-send-email-lance.lmwang@gmail.com> References: <1638714396-23062-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 5/6] avformat/rtsp: use MAX_URL_SIZE for one line parse 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 Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: XyEm63htDQNb From: Limin Wang The buf is used for one line of sdp parsing, so it's ok to use MAX_URL_SIZE Signed-off-by: Limin Wang --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 233ed16..a8d079e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -709,7 +709,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content) { const char *p; int letter, i; - char buf[SDP_MAX_SIZE], *q; + char buf[MAX_URL_SIZE], *q; SDPParseState sdp_parse_state = { { 0 } }, *s1 = &sdp_parse_state; p = content;