]> git.sesse.net Git - ffmpeg/commitdiff
avformat/librist: simplify secret strlcpy
authorMarton Balint <cus@passwd.hu>
Sat, 6 Mar 2021 21:31:06 +0000 (22:31 +0100)
committerMarton Balint <cus@passwd.hu>
Sat, 13 Mar 2021 16:36:48 +0000 (17:36 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/librist.c

index 3f74521cb47c68e178d7b1986ca369a29a4ffd8a..2fb3162f86a3d0f901711f5c32c682ece9b3d569 100644 (file)
@@ -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;