mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
Fix new stringop-truncation warnings
This commit is contained in:
@@ -1006,7 +1006,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
sc.type = 1;
|
||||
sc.port = htons (dcc->port);
|
||||
sc.address = htonl (dcc->addr);
|
||||
strncpy (sc.username, prefs.hex_irc_user_name, 9);
|
||||
g_strlcpy (sc.username, prefs.hex_irc_user_name, sizeof (sc.username));
|
||||
memcpy (proxy->buffer, &sc, sizeof (sc));
|
||||
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
||||
proxy->bufferused = 0;
|
||||
|
||||
@@ -1042,7 +1042,7 @@ traverse_socks (int print_fd, int sok, char *serverAddr, int port)
|
||||
sc.type = 1;
|
||||
sc.port = htons (port);
|
||||
sc.address = inet_addr (serverAddr);
|
||||
strncpy (sc.username, prefs.hex_irc_user_name, 9);
|
||||
g_strlcpy (sc.username, prefs.hex_irc_user_name, sizeof (sc.username));
|
||||
|
||||
send (sok, (char *) &sc, 8 + strlen (sc.username) + 1, 0);
|
||||
buf[1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user