mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 05:31:29 +00:00
Fix strcpy copying buffer into itself, thanks to Simon McVittie for reporting and the patch (#4894)
This commit is contained in:
parent
8a3f2ff805
commit
8cd4b77a1e
1 changed files with 2 additions and 1 deletions
|
@ -1488,7 +1488,8 @@ char *EasyClientName(int client, char *buf, int size) {
|
|||
char *str1, *str2, *ptr, c;
|
||||
char name[128];
|
||||
|
||||
strcpy(name, ClientName(client, name, sizeof(name)));
|
||||
ClientName(client, name, sizeof(name));
|
||||
|
||||
for (i = 0; name[i]; i++) name[i] &= 127;
|
||||
//remove all spaces
|
||||
for (ptr = strstr(name, " "); ptr; ptr = strstr(name, " ")) {
|
||||
|
|
Loading…
Reference in a new issue