Replace strncpy with snprintf where necessary

This commit is contained in:
2021-05-11 22:10:02 +02:00
parent 43c512dc5a
commit 4994b4375b
6 changed files with 7 additions and 6 deletions

View File

@ -682,7 +682,7 @@ int client_connection_handler(sock *client, unsigned long client_num) {
if (pos != NULL) {
pos = strstr(pos, "\"iso_code\":");
pos += 12;
strncpy(client_cc, pos, 2);
snprintf(client_cc, sizeof(client_cc), "%s", pos);
}
}