diff options
author | Denys Vlasenko | 2009-05-27 18:01:42 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-05-27 18:01:42 +0200 |
commit | 20cc390b9bb33cd0ab05c8bbfcd24babad7ec204 (patch) | |
tree | 876974f2abe0ae0213e5707fb551af70b73665cd /networking/udhcp/leases.c | |
parent | bae3abf2c7185f0a9145ed2c97abb2d2e7bc2b40 (diff) | |
download | busybox-20cc390b9bb33cd0ab05c8bbfcd24babad7ec204.zip busybox-20cc390b9bb33cd0ab05c8bbfcd24babad7ec204.tar.gz |
post-1.14.0 fixes
hush significantly updated.
fixes for acpid, awk, depmod, dhcp, gzip, mdev, modprobe, sysctl.
libbb fixes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/leases.c')
-rw-r--r-- | networking/udhcp/leases.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c index 6e1398d..e17fb9e 100644 --- a/networking/udhcp/leases.c +++ b/networking/udhcp/leases.c @@ -63,7 +63,8 @@ struct dhcpOfferedAddr* FAST_FUNC add_lease( if (oldest) { oldest->hostname[0] = '\0'; if (hostname) { - hostname_length = hostname[-1]; /* look at option size byte */ + /* option size byte, + 1 for NUL */ + hostname_length = hostname[-1] + 1; if (hostname_length > sizeof(oldest->hostname)) hostname_length = sizeof(oldest->hostname); hostname = (uint8_t*) safe_strncpy((char*)oldest->hostname, (char*)hostname, hostname_length); |