summaryrefslogtreecommitdiff
path: root/networking/udhcp/leases.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-06-12 15:51:29 +0200
committerDenys Vlasenko2010-06-12 15:51:29 +0200
commitd0db975a9f399140ddb7dacdfffaf098df3e249b (patch)
tree4b9cbdad519a80e410dea6c2a917d77bd3209ad5 /networking/udhcp/leases.c
parent58cdca3984beb4e1019ef5ccf1dd7361f032a9a6 (diff)
downloadbusybox-d0db975a9f399140ddb7dacdfffaf098df3e249b.zip
busybox-d0db975a9f399140ddb7dacdfffaf098df3e249b.tar.gz
post-1.16.1 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/leases.c')
-rw-r--r--networking/udhcp/leases.c2
1 files changed, 2 insertions, 0 deletions
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);