From patchwork Sun Feb 28 22:32:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan J." X-Patchwork-Id: 26035 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 01F2C44BC80 for ; Mon, 1 Mar 2021 00:32:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA78668A83B; Mon, 1 Mar 2021 00:32:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vm6.ganeti.dyne.org (vm6.ganeti.dyne.org [195.169.149.119]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 24509689C5C for ; Mon, 1 Mar 2021 00:32:19 +0200 (EET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: parazyd@dyne.org) with ESMTPSA id 04EF2F60B6D From: parazyd To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 Feb 2021 23:32:02 +0100 Message-Id: <20210228223203.31208-1-parazyd@dyne.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org Subject: [FFmpeg-devel] [PATCH v3 1/2] avformat/gopher: Add default_whitelist to ff_gopher_protocol 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: parazyd Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: parazyd --- configure | 2 +- libavformat/gopher.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 98daa1a64a..380fca5245 100755 --- a/configure +++ b/configure @@ -3450,7 +3450,7 @@ ffrtmpcrypt_protocol_select="tcp_protocol" ffrtmphttp_protocol_conflict="librtmp_protocol" ffrtmphttp_protocol_select="http_protocol" ftp_protocol_select="tcp_protocol" -gopher_protocol_select="network" +gopher_protocol_select="tcp_protocol" http_protocol_select="tcp_protocol" http_protocol_suggest="zlib" httpproxy_protocol_select="tcp_protocol" diff --git a/libavformat/gopher.c b/libavformat/gopher.c index 8b6d14a1f7..7c88ab01a8 100644 --- a/libavformat/gopher.c +++ b/libavformat/gopher.c @@ -110,13 +110,13 @@ static int gopher_read(URLContext *h, uint8_t *buf, int size) return len; } - const URLProtocol ff_gopher_protocol = { - .name = "gopher", - .url_open = gopher_open, - .url_read = gopher_read, - .url_write = gopher_write, - .url_close = gopher_close, - .priv_data_size = sizeof(GopherContext), - .flags = URL_PROTOCOL_FLAG_NETWORK, + .name = "gopher", + .url_open = gopher_open, + .url_read = gopher_read, + .url_write = gopher_write, + .url_close = gopher_close, + .priv_data_size = sizeof(GopherContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, + .default_whitelist = "gopher,tcp" };