mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Utilize strlcpy().
This commit is contained in:
parent
10f99918d8
commit
1c8ee5f26c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188886
@ -113,10 +113,7 @@ get_names(int argc, char *argv[])
|
||||
msg.addr.sa_family = htons(AF_INET);
|
||||
msg.ctl_addr.sa_family = htons(AF_INET);
|
||||
msg.id_num = htonl(0);
|
||||
strncpy(msg.l_name, my_name, NAME_SIZE);
|
||||
msg.l_name[NAME_SIZE - 1] = '\0';
|
||||
strncpy(msg.r_name, his_name, NAME_SIZE);
|
||||
msg.r_name[NAME_SIZE - 1] = '\0';
|
||||
strncpy(msg.r_tty, his_tty, TTY_SIZE);
|
||||
msg.r_tty[TTY_SIZE - 1] = '\0';
|
||||
strlcpy(msg.l_name, my_name, NAME_SIZE);
|
||||
strlcpy(msg.r_name, his_name, NAME_SIZE);
|
||||
strlcpy(msg.r_tty, his_tty, TTY_SIZE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user