Lots of str[n]cat, str[n]cpy, and [v]sprintf have been replaced by strlcat, strlcpy...
[xonotic/darkplaces.git] / sv_main.c
index 8f4eb83..ac63682 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1370,7 +1370,7 @@ void SV_UpdateToReliableMessages (void)
                        if (s == NULL)
                                s = "";
                        // point the string back at host_client->name to keep it safe
-                       strncpy(host_client->name, s, sizeof(host_client->name) - 1);
+                       strlcpy (host_client->name, s, sizeof (host_client->name));
                        sv_player->v->netname = PR_SetString(host_client->name);
                }
                if ((val = GETEDICTFIELDVALUE(sv_player, eval_clientcolors)) && host_client->colors != val->_float)