From 277f0f67c5df5c1b023a737548e692ad92831ca3 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 27 May 2015 15:00:02 -0400 Subject: [PATCH] When converting timeout from ll to int, also guard against underflow. --- src/ndhc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ndhc.c b/src/ndhc.c index f0623e2..bee0b8e 100644 --- a/src/ndhc.c +++ b/src/ndhc.c @@ -409,6 +409,7 @@ static void do_ndhc_work(void) arp_wake_ts : cs.dhcp_wake_ts) - nowts; } if (tt > INT_MAX) tt = INT_MAX; + if (tt < INT_MIN) tt = INT_MIN; timeout = tt; if (timeout < 0) timeout = 0;