From d0db975a9f399140ddb7dacdfffaf098df3e249b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 12 Jun 2010 15:51:29 +0200 Subject: post-1.16.1 fixes Signed-off-by: Denys Vlasenko --- networking/udhcp/leases.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'networking/udhcp/leases.c') diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c index 78b0d0a..7b6bb20 100644 --- a/networking/udhcp/leases.c +++ b/networking/udhcp/leases.c @@ -64,6 +64,8 @@ struct dyn_lease* FAST_FUNC add_lease( oldest->hostname[0] = '\0'; if (hostname) { char *p; + + hostname_len++; /* include NUL */ if (hostname_len > sizeof(oldest->hostname)) hostname_len = sizeof(oldest->hostname); p = safe_strncpy(oldest->hostname, hostname, hostname_len); -- cgit v1.1