summaryrefslogtreecommitdiff
path: root/usr.sbin/bootpd/getether.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-12-20 21:16:52 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-12-20 21:16:52 +0000
commit9b618834f991f70bcd06dfc2c1518da1a1395054 (patch)
tree1bf94eec9e376d91cc44005948dd97656d2fc13e /usr.sbin/bootpd/getether.c
parentc4b2ec273b33c4f50adf3bf8cfd995c3006a754e (diff)
o make sure C-style strings in packet are NUL-terminated and increase size of
buf in report() for 256; W.H.J.Pinckaers@CPEDU.RUG.NL o kill sprintf in favor of snprintf everywhere (paranoia...)
Diffstat (limited to 'usr.sbin/bootpd/getether.c')
-rw-r--r--usr.sbin/bootpd/getether.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bootpd/getether.c b/usr.sbin/bootpd/getether.c
index a2b2f1d9daf..1e4e835deba 100644
--- a/usr.sbin/bootpd/getether.c
+++ b/usr.sbin/bootpd/getether.c
@@ -185,7 +185,7 @@ getether(ifname, eap)
char *enaddr;
int unit = -1; /* which unit to attach */
- sprintf(devname, "/dev/%s", ifname);
+ snprintf(devname, sizeof(devname), "/dev/%s", ifname);
fd = open(devname, 2);
if (fd < 0) {
/* Try without the trailing digit. */