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