avoid overflow in poll() timeout calculation
Closes PR 14410 Merge to v6.0.1
This commit is contained in:
parent
414507699b
commit
393456563e
|
@ -10667,6 +10667,8 @@ static void default_sleep(float v, void *fds)
|
|||
|
||||
if (v <= 0.0)
|
||||
timeout = -1;
|
||||
else if (v > 100000)
|
||||
timeout = 100000000;
|
||||
else {
|
||||
timeout = (int)(v * 1000.0);
|
||||
if (timeout < 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user