summaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 3559215..1b2cc96 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -420,7 +420,11 @@ void FAST_FUNC read_leases(const char *file)
continue;
/* NB: add_lease takes "relative time", IOW,
* lease duration, not lease deadline. */
- if (!(add_lease(lease.lease_mac, lease.lease_nip, expires, lease.hostname))) {
+ if (add_lease(lease.lease_mac, lease.lease_nip,
+ expires,
+ lease.hostname, sizeof(lease.hostname)
+ ) == 0
+ ) {
bb_error_msg("too many leases while loading %s", file);
break;
}