diff options
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r-- | usr.sbin/rtadvd/advcap.c | 4 | ||||
-rw-r--r-- | usr.sbin/rtadvd/config.c | 2 | ||||
-rw-r--r-- | usr.sbin/rtadvd/dump.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/rtadvd/advcap.c b/usr.sbin/rtadvd/advcap.c index f201d0c..b83fbbb 100644 --- a/usr.sbin/rtadvd/advcap.c +++ b/usr.sbin/rtadvd/advcap.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: advcap.c,v 1.5 2001/02/01 09:12:08 jinmei Exp $ */ +/* $KAME: advcap.c,v 1.11 2003/05/19 09:46:50 keiichi Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. @@ -206,7 +206,7 @@ tnchktc() /* p now points to beginning of last field */ if (p[0] != 't' || p[1] != 'c') return (1); - strcpy(tcname, p+3); + strlcpy(tcname, p + 3, sizeof tcname); q = tcname; while (*q && *q != ':') q++; diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index f8c8abb..7f3d417 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -602,7 +602,7 @@ makeentry(buf, len, id, string, add) { char *ep = buf + len; - strcpy(buf, string); + strlcpy(buf, string, len); if (add) { char *cp; diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c index 122f31f..bd19687 100644 --- a/usr.sbin/rtadvd/dump.c +++ b/usr.sbin/rtadvd/dump.c @@ -83,17 +83,17 @@ static char * ether_str(sdl) struct sockaddr_dl *sdl; { - static char ebuf[32]; + static char hbuf[32]; u_char *cp; if (sdl->sdl_alen && sdl->sdl_alen > 5) { cp = (u_char *)LLADDR(sdl); - sprintf(ebuf, "%x:%x:%x:%x:%x:%x", + snprintf(hbuf, sizeof(hbuf), "%x:%x:%x:%x:%x:%x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); } else - sprintf(ebuf, "NONE"); + snprintf(hbuf, sizeof(hbuf), "NONE"); - return(ebuf); + return(hbuf); } static void |