summaryrefslogtreecommitdiff
path: root/package/busybox
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-04-26 21:17:29 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-04-26 21:17:29 +0000
commit78e8e2c74eb45543b3b9aa96b16010bb9ee65fbf (patch)
tree11e623ab5178f30c6b97323f03b6a8e701263a0c /package/busybox
parentd76155005fade524ed4343b8f90771c72a159d47 (diff)
busybox: 1.14.0 dhcp fix
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/busybox-1.14.0-dhcp_hostname.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.14.0-dhcp_hostname.patch b/package/busybox/busybox-1.14.0-dhcp_hostname.patch
new file mode 100644
index 000000000..79bc5eaae
--- /dev/null
+++ b/package/busybox/busybox-1.14.0-dhcp_hostname.patch
@@ -0,0 +1,12 @@
+--- busybox-1.14.0/networking/udhcp/leases.c Tue Apr 14 01:42:51 2009
++++ busybox-1.14.0-dhcp_hostname/networking/udhcp/leases.c Tue Apr 21 02:41:22 2009
+@@ -63,7 +63,8 @@
+ 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);