diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-12 15:51:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-12 15:51:29 +0200 |
commit | d0db975a9f399140ddb7dacdfffaf098df3e249b (patch) | |
tree | 4b9cbdad519a80e410dea6c2a917d77bd3209ad5 /networking/udhcp | |
parent | 58cdca3984beb4e1019ef5ccf1dd7361f032a9a6 (diff) | |
download | busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.tar.gz busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.tar.bz2 busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.zip |
post-1.16.1 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/leases.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c index 78b0d0ade..7b6bb2066 100644 --- a/networking/udhcp/leases.c +++ b/networking/udhcp/leases.c | |||
@@ -64,6 +64,8 @@ struct dyn_lease* FAST_FUNC add_lease( | |||
64 | oldest->hostname[0] = '\0'; | 64 | oldest->hostname[0] = '\0'; |
65 | if (hostname) { | 65 | if (hostname) { |
66 | char *p; | 66 | char *p; |
67 | |||
68 | hostname_len++; /* include NUL */ | ||
67 | if (hostname_len > sizeof(oldest->hostname)) | 69 | if (hostname_len > sizeof(oldest->hostname)) |
68 | hostname_len = sizeof(oldest->hostname); | 70 | hostname_len = sizeof(oldest->hostname); |
69 | p = safe_strncpy(oldest->hostname, hostname, hostname_len); | 71 | p = safe_strncpy(oldest->hostname, hostname, hostname_len); |