[FFmpeg-devel] [PATCH 4/7] avformat/librist: simplify secret strlcpy

Marton Balint cus at passwd.hu
Sun Mar 7 01:26:16 EET 2021


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 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;
-- 
2.26.2



More information about the ffmpeg-devel mailing list