[FFmpeg-cvslog] avformat/librist: simplify secret strlcpy

Marton Balint git at videolan.org
Sat Mar 13 20:43:45 EET 2021


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Mar  6 22:31:06 2021 +0100| [7b0832dea8fe266011e2891402e091562edbb6ba] | committer: Marton Balint

avformat/librist: simplify secret strlcpy

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b0832dea8fe266011e2891402e091562edbb6ba
---

 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;



More information about the ffmpeg-cvslog mailing list