diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-29 00:48:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-06-29 00:48:02 +0000 |
commit | c02f55396e7c25723491f27ddba63a4ce5ffecf4 (patch) | |
tree | ad42d5a9f005269bc04cbaba1305fd15902a1fc3 /sbin | |
parent | daebc1b04afae4d4d1e16e96046c83518bd2533f (diff) |
use strlcpy; nicm__@ntlworld.com
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/lmccontrol/lmccontrol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/lmccontrol/lmccontrol.c b/sbin/lmccontrol/lmccontrol.c index 20dd74051aa..2c46bcfe4dd 100644 --- a/sbin/lmccontrol/lmccontrol.c +++ b/sbin/lmccontrol/lmccontrol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lmccontrol.c,v 1.7 2006/06/02 07:01:29 jmc Exp $ */ +/* $OpenBSD: lmccontrol.c,v 1.8 2006/06/29 00:48:01 deraadt Exp $ */ /*- * Copyright (c) 1997-1999 LAN Media Corporation (LMC) @@ -169,7 +169,7 @@ main(int argc, char **argv) exit(1); } - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)&ctl; if (ioctl(fd, SPPPIOCCISCO, &ifr) < 0) { fprintf(stderr, "ioctl %s SPPPIOCCISCO: %s\n", @@ -188,7 +188,7 @@ main(int argc, char **argv) return (1); } - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)&ctl; #if defined(linux) /* Linux IOCTL */ if (ioctl(fd, SPPPIOCPPP, &ifr) < 0) { @@ -214,7 +214,7 @@ main(int argc, char **argv) return (1); } - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)&ctl; /* |