When converting timeout from ll to int, also guard against underflow.
This commit is contained in:
parent
e02d30dcc5
commit
277f0f67c5
@ -409,6 +409,7 @@ static void do_ndhc_work(void)
|
|||||||
arp_wake_ts : cs.dhcp_wake_ts) - nowts;
|
arp_wake_ts : cs.dhcp_wake_ts) - nowts;
|
||||||
}
|
}
|
||||||
if (tt > INT_MAX) tt = INT_MAX;
|
if (tt > INT_MAX) tt = INT_MAX;
|
||||||
|
if (tt < INT_MIN) tt = INT_MIN;
|
||||||
timeout = tt;
|
timeout = tt;
|
||||||
if (timeout < 0)
|
if (timeout < 0)
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user