summaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-02-17 19:20:32 +0100
committerDenys Vlasenko2017-02-17 19:20:32 +0100
commit7c67f1e9abf8bc26868236bbe3aa35aa130e2696 (patch)
tree8c3104026d1f1c87869874b84b8ce044fca9fdf8 /networking/udhcp/d6_dhcpc.c
parent94dcfd8cc065b699081984d6f4b4bbfc811937b1 (diff)
downloadbusybox-7c67f1e9abf8bc26868236bbe3aa35aa130e2696.zip
busybox-7c67f1e9abf8bc26868236bbe3aa35aa130e2696.tar.gz
udhcpc: make sure we do not overflow poll timeout
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/d6_dhcpc.c')
-rw-r--r--networking/udhcp/d6_dhcpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 067d351..bea589d 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1085,7 +1085,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
if (tv > 0) {
log1("waiting on select %u seconds", tv);
timestamp_before_wait = (unsigned)monotonic_sec();
- retval = poll(pfds, 2, tv * 1000);
+ retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX);
if (retval < 0) {
/* EINTR? A signal was caught, don't panic */
if (errno == EINTR) {