package/busybox: add upstream udhcp hostname truncation fix, bump release number
[openwrt/svn-archive/archive.git] / package / busybox / patches / 000-upstream-dhcpd.patch
1 --- a/networking/udhcp/leases.c
2 +++ b/networking/udhcp/leases.c
3 @@ -64,6 +64,8 @@ struct dyn_lease* FAST_FUNC add_lease(
4 oldest->hostname[0] = '\0';
5 if (hostname) {
6 char *p;
7 +
8 + hostname_len++; /* include NUL */
9 if (hostname_len > sizeof(oldest->hostname))
10 hostname_len = sizeof(oldest->hostname);
11 p = safe_strncpy(oldest->hostname, hostname, hostname_len);