PR: 2100
[openssl.git] / crypto / rand / rand_win.c
index 9bad067f43202540c7b79d71713c258f7d1e9061..5198351cf34ea99b562c146ad040eb9f7215ff69 100644 (file)
@@ -527,6 +527,7 @@ int RAND_poll(void)
                                                        RAND_add(&hentry,
                                                                hentry.dwSize, 5);
                                                while (heap_next(&hentry)
+                                               && (!good || (GetTickCount()-starttime)<MAXDELAY)
                                                        && --entrycnt > 0);
                                                }
                                                }