]> git.sesse.net Git - vlc/commitdiff
Use strlcpy
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 29 Apr 2006 15:10:39 +0000 (15:10 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 29 Apr 2006 15:10:39 +0000 (15:10 +0000)
modules/stream_out/rtp.c

index 112df4b551ab90e431ac4c1bf0eecc0ae75ac1ee..fb14e45869e4c9b72bfe04b1e61d5d6d3c4e71b2 100644 (file)
@@ -1791,8 +1791,7 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
                     snprintf( psz_access, sizeof( psz_access ),
                               "udp{raw,ttl=%d}", p_sys->i_ttl );
                 else
-                    strncpy( psz_access, "udp{raw}", sizeof( psz_access ) );
-                psz_access[sizeof( psz_access ) - 1] = '\0';
+                    strlcpy( psz_access, "udp{raw}", sizeof( psz_access ) );
 
                 snprintf( psz_url, sizeof( psz_url ),
                          ( strchr( ip, ':' ) != NULL ) ? "[%s]:%d" : "%s:%d",