diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-12-20 21:16:52 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-12-20 21:16:52 +0000 |
commit | 9b618834f991f70bcd06dfc2c1518da1a1395054 (patch) | |
tree | 1bf94eec9e376d91cc44005948dd97656d2fc13e /usr.sbin/bootpd/readfile.c | |
parent | c4b2ec273b33c4f50adf3bf8cfd995c3006a754e (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/readfile.c')
-rw-r--r-- | usr.sbin/bootpd/readfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bootpd/readfile.c b/usr.sbin/bootpd/readfile.c index 8f1afb6f93e..15126a58f50 100644 --- a/usr.sbin/bootpd/readfile.c +++ b/usr.sbin/bootpd/readfile.c @@ -21,7 +21,7 @@ SOFTWARE. ************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: readfile.c,v 1.3 1998/11/28 04:07:24 millert Exp $"; +static char rcsid[] = "$Id: readfile.c,v 1.4 1998/12/20 21:16:51 millert Exp $"; #endif @@ -819,7 +819,7 @@ eval_symbol(symbol, hp) if ((*symbol)[0] == 'T') { /* generic symbol */ (*symbol)++; value = get_u_long(symbol); - sprintf(current_tagname, "T%d", value); + snprintf(current_tagname, sizeof(current_tagname), "T%d", value); eat_whitespace(symbol); if ((*symbol)[0] != '=') { return E_SYNTAX_ERROR; |