From 393456563e2562c8e6358705328dbc4b059cad37 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 13 Apr 2014 19:08:19 -0600 Subject: [PATCH] avoid overflow in poll() timeout calculation Closes PR 14410 Merge to v6.0.1 --- racket/src/racket/src/port.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/racket/src/racket/src/port.c b/racket/src/racket/src/port.c index d4b41e7141..78d976a17d 100644 --- a/racket/src/racket/src/port.c +++ b/racket/src/racket/src/port.c @@ -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)