summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 25856a5ff72..3076cd69c21 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.17 2003/01/07 09:00:33 kjc Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.18 2003/05/06 07:28:39 deraadt Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -4109,7 +4109,7 @@ sppp_cp_type_name(u_char type)
case ECHO_REPLY: return "echo-reply";
case DISC_REQ: return "discard-req";
}
- sprintf (buf, "0x%x", type);
+ snprintf (buf, sizeof buf, "0x%x", type);
return buf;
}
@@ -4132,7 +4132,7 @@ sppp_auth_type_name(u_short proto, u_char type)
case PAP_NAK: return "nak";
}
}
- sprintf (buf, "0x%x", type);
+ snprintf (buf, sizeof buf, "0x%x", type);
return buf;
}
@@ -4149,7 +4149,7 @@ sppp_lcp_opt_name(u_char opt)
case LCP_OPT_PROTO_COMP: return "proto-comp";
case LCP_OPT_ADDR_COMP: return "addr-comp";
}
- sprintf (buf, "0x%x", opt);
+ snprintf (buf, sizeof buf, "0x%x", opt);
return buf;
}
@@ -4162,7 +4162,7 @@ sppp_ipcp_opt_name(u_char opt)
case IPCP_OPT_COMPRESSION: return "compression";
case IPCP_OPT_ADDRESS: return "address";
}
- sprintf (buf, "0x%x", opt);
+ snprintf (buf, sizeof buf, "0x%x", opt);
return buf;
}
@@ -4207,7 +4207,7 @@ sppp_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;
}
@@ -4240,7 +4240,7 @@ HIDE const char *
sppp_dotted_quad(u_long addr)
{
static char s[16];
- sprintf(s, "%d.%d.%d.%d",
+ snprintf(s, sizeof s, "%d.%d.%d.%d",
(int)((addr >> 24) & 0xff),
(int)((addr >> 16) & 0xff),
(int)((addr >> 8) & 0xff),