diff options
-rw-r--r-- | usr.sbin/eeprom/eehandlers.c | 4 | ||||
-rw-r--r-- | usr.sbin/spppcontrol/spppcontrol.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/eeprom/eehandlers.c b/usr.sbin/eeprom/eehandlers.c index f8547e275ae..8a19402ec0d 100644 --- a/usr.sbin/eeprom/eehandlers.c +++ b/usr.sbin/eeprom/eehandlers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eehandlers.c,v 1.8 2002/02/16 21:28:02 millert Exp $ */ +/* $OpenBSD: eehandlers.c,v 1.9 2002/05/29 09:48:14 deraadt Exp $ */ /* $NetBSD: eehandlers.c,v 1.2 1996/02/28 01:13:22 thorpej Exp $ */ /*- @@ -502,7 +502,7 @@ doio(ktent, buf, len, wr) buf2 = (u_char *)calloc(1, len); if (buf2 == NULL) { - sprintf(err_str, "memory allocation failed"); + snprintf(err_str, sizeof err_str, "memory allocation failed"); return (1); } diff --git a/usr.sbin/spppcontrol/spppcontrol.c b/usr.sbin/spppcontrol/spppcontrol.c index 6f69873e9c4..977b501682d 100644 --- a/usr.sbin/spppcontrol/spppcontrol.c +++ b/usr.sbin/spppcontrol/spppcontrol.c @@ -222,7 +222,7 @@ proto_name(u_short proto) case PPP_PAP: return "pap"; case PPP_CHAP: return "chap"; } - sprintf(buf, "0x%x", (unsigned)proto); + snprintf(buf, sizeof buf, "0x%x", (unsigned)proto); return buf; } @@ -232,8 +232,8 @@ authflags(u_short flags) static char buf[30]; buf[0] = '\0'; if (flags & AUTHFLAG_NOCALLOUT) - strcat(buf, " callin"); + strlcat(buf, " callin", sizeof buf); if (flags & AUTHFLAG_NORECHALLENGE) - strcat(buf, " norechallenge"); + strlcat(buf, " norechallenge", sizeof buf); return buf; } |