diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-06-18 20:44:37 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-06-18 20:44:37 +0000 |
commit | 4086d48e9615fa4acf675925af863f9465e5e7b1 (patch) | |
tree | 91583d639935b1c45dc4581599004b958a21fa05 /sbin | |
parent | d4e338bcf71f1f29e26274b47541fc6735e5e307 (diff) |
strcpy() -> strlcpy()
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ancontrol/ancontrol.c | 6 | ||||
-rw-r--r-- | sbin/wicontrol/wicontrol.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sbin/ancontrol/ancontrol.c b/sbin/ancontrol/ancontrol.c index 986fc863c96..74c6ebf5b39 100644 --- a/sbin/ancontrol/ancontrol.c +++ b/sbin/ancontrol/ancontrol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ancontrol.c,v 1.2 2000/05/20 17:28:41 deraadt Exp $ */ +/* $OpenBSD: ancontrol.c,v 1.3 2000/06/18 20:44:33 aaron Exp $ */ /* * Copyright 1997, 1998, 1999 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -129,7 +129,7 @@ an_getval(iface, areq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)areq; s = socket(AF_INET, SOCK_DGRAM, 0); @@ -155,7 +155,7 @@ an_setval(iface, areq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)areq; s = socket(AF_INET, SOCK_DGRAM, 0); diff --git a/sbin/wicontrol/wicontrol.c b/sbin/wicontrol/wicontrol.c index 5364f523554..f1e2d7ccc75 100644 --- a/sbin/wicontrol/wicontrol.c +++ b/sbin/wicontrol/wicontrol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wicontrol.c,v 1.7 2000/03/02 18:50:00 ho Exp $ */ +/* $OpenBSD: wicontrol.c,v 1.8 2000/06/18 20:44:36 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -66,7 +66,7 @@ static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\ Bill Paul. All rights reserved."; static const char rcsid[] = - "@(#) $Id: wicontrol.c,v 1.7 2000/03/02 18:50:00 ho Exp $"; + "@(#) $Id: wicontrol.c,v 1.8 2000/06/18 20:44:36 aaron Exp $"; #endif static void wi_getval __P((char *, struct wi_req *)); @@ -93,7 +93,7 @@ static void wi_getval(iface, wreq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)wreq; s = socket(AF_INET, SOCK_DGRAM, 0); @@ -118,7 +118,7 @@ static void wi_setval(iface, wreq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)wreq; s = socket(AF_INET, SOCK_DGRAM, 0); |