1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 07:02:27 +02:00
openwrt-xburst/package/busybox/patches/000-upstream-dhcpd.patch
nico f5275883b9 package/busybox: add upstream udhcp hostname truncation fix, bump release number
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21510 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-19 21:39:10 +00:00

12 lines
383 B
Diff

--- 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);