summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/iplist.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-23 22:38:55 +0000
committerbrian <brian@FreeBSD.org>1997-12-23 22:38:55 +0000
commit24138e024fe13d912a174a8e0e784bf1a1e0a29d (patch)
treecce9d71a4b4a1baea1557e670c6c8e497c76b237 /usr.sbin/ppp/iplist.c
parent9672a80ab32ce23bfa528d665a4d62625db2e8a6 (diff)
downloadFreeBSD-src-24138e024fe13d912a174a8e0e784bf1a1e0a29d.zip
FreeBSD-src-24138e024fe13d912a174a8e0e784bf1a1e0a29d.tar.gz
strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)
Suggested by: Philippe Charnier <charnier@lirmm.fr> Theo de Raadt <deraadt@cvs.openbsd.org>
Diffstat (limited to 'usr.sbin/ppp/iplist.c')
-rw-r--r--usr.sbin/ppp/iplist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/iplist.c b/usr.sbin/ppp/iplist.c
index 84c2c76..e74add7 100644
--- a/usr.sbin/ppp/iplist.c
+++ b/usr.sbin/ppp/iplist.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: iplist.c,v 1.2 1997/12/21 12:11:06 brian Exp $
*/
#include <sys/types.h>
@@ -149,7 +149,7 @@ iplist_next(struct iplist *list)
int
iplist_setsrc(struct iplist *list, const char *src)
{
- strncpy(list->src, src, sizeof(list->src));
+ strncpy(list->src, src, sizeof(list->src)-1);
list->src[sizeof(list->src)-1] = '\0';
list->cur.srcptr = list->src;
do {
OpenPOWER on IntegriCloud