summaryrefslogtreecommitdiff
path: root/usr.sbin/bootpd/bootptest.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/bootptest.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/bootptest.c')
-rw-r--r--usr.sbin/bootpd/bootptest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bootpd/bootptest.c b/usr.sbin/bootpd/bootptest.c
index 1d5a465f391..337bbaabe62 100644
--- a/usr.sbin/bootpd/bootptest.c
+++ b/usr.sbin/bootpd/bootptest.c
@@ -481,7 +481,7 @@ ipaddr_string(ina)
u_char *p;
p = (u_char *) ina;
- sprintf(b, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+ snprintf(b, sizeof(b), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
return (b);
}