diff options
Diffstat (limited to 'slirp/udp.c')
-rw-r--r-- | slirp/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slirp/udp.c b/slirp/udp.c index 0583d7e979..8030326ad6 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -475,14 +475,14 @@ struct cu_header { type = omsg->type; OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; - strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(omsg->l_name, NAME_SIZE_OLD, getlogin()); } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; OTOSIN(nmsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; - strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(nmsg->l_name, NAME_SIZE_OLD, getlogin()); } if (type == LOOK_UP) |