From patchwork Sat Mar 6 23:26:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 26233 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 1ED9644B0B2 for ; Sun, 7 Mar 2021 01:27:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 050CF68A6F0; Sun, 7 Mar 2021 01:27:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1F22B68A83C for ; Sun, 7 Mar 2021 01:27:25 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 0B457E5128; Sun, 7 Mar 2021 00:27:25 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1y3SeOpF9Z8d; Sun, 7 Mar 2021 00:26:55 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 39A13E512B; Sun, 7 Mar 2021 00:26:29 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Mar 2021 00:26:16 +0100 Message-Id: <20210306232619.5963-4-cus@passwd.hu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210306232619.5963-1-cus@passwd.hu> References: <20210306232619.5963-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/7] avformat/librist: simplify secret strlcpy 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavformat/librist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/librist.c b/libavformat/librist.c index 3f74521cb4..2fb3162f86 100644 --- a/libavformat/librist.c +++ b/libavformat/librist.c @@ -158,7 +158,7 @@ static int librist_open(URLContext *h, const char *uri, int flags) } if (s->secret && peer_config->secret[0] == 0) - av_strlcpy(peer_config->secret, s->secret, FFMIN(RIST_MAX_STRING_SHORT - 1, strlen(s->secret))); + av_strlcpy(peer_config->secret, s->secret, RIST_MAX_STRING_SHORT); if (s->secret && (s->encryption == 128 || s->encryption == 256)) peer_config->key_size = s->encryption;