diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-03-19 13:12:00 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-03-19 13:12:00 +0000 |
commit | f265a7c6c7b768128c8a47980ffaf79cf9a5b13a (patch) | |
tree | ec3bd8e7fde7617e4ad2c26232d751c2a1e494e7 /usr.sbin | |
parent | 8706915b0b62cbe93b94e75aafde093f11b2fb47 (diff) |
Fix parsing of the leases file.
src & dst parameters to the only remaining strncpy() in the file were
reversed. Use strlcpy() instead, with parameters in correct order.
ok millert@.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcp/server/confpars.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/dhcp/server/confpars.c b/usr.sbin/dhcp/server/confpars.c index 4d69dd7580a..fec0c61d274 100644 --- a/usr.sbin/dhcp/server/confpars.c +++ b/usr.sbin/dhcp/server/confpars.c @@ -1179,8 +1179,7 @@ struct lease *parse_lease_declaration (cfile) parse_warn ("unexpected end of file"); break; } - strncpy (val, tbuf, sizeof tbuf); - tbuf [(sizeof tbuf) - 1] = 0; + strlcpy (tbuf, val, sizeof tbuf); /* Parse any of the times associated with the lease. */ if (token == STARTS || token == ENDS || token == TIMESTAMP) { |