When converting timeout from ll to int, also guard against underflow.

This commit is contained in:
Nicholas J. Kain 2015-05-27 15:00:02 -04:00
parent e02d30dcc5
commit 277f0f67c5

View File

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