projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a2c793
)
udhcpd: fix hostname truncation bug 1663
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 2 May 2010 12:17:07 +0000
(14:17 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 2 May 2010 12:17:07 +0000
(14:17 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/leases.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/leases.c
b/networking/udhcp/leases.c
index 4999d8079eadf54088297915f97df8a0d0a8c714..fad71ec6c0c85a530c7f33cadfcee64e66057d53 100644
(file)
--- a/
networking/udhcp/leases.c
+++ b/
networking/udhcp/leases.c
@@
-60,6
+60,8
@@
struct dyn_lease* FAST_FUNC add_lease(
memset(oldest, 0, sizeof(*oldest));
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);