aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_win.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-02-17 14:32:41 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-02-17 14:32:41 +0000
commit47e0a1c335295d7548ecd1860954ee4f988d9804 (patch)
tree7daf14217e7dc722d8063990a857d0f25e7707dc /crypto/rand/rand_win.c
parent439aab3afca0cb7478db39396aa82c574fe73bcd (diff)
downloadopenssl-47e0a1c335295d7548ecd1860954ee4f988d9804.tar.gz
PR: 2100
Submitted by: James Baker <jbaker@tableausoftware.com> et al. Workaround for slow Heap32Next on some versions of Windows.
Diffstat (limited to 'crypto/rand/rand_win.c')
-rw-r--r--crypto/rand/rand_win.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 9bad067f43..5198351cf3 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -527,6 +527,7 @@ int RAND_poll(void)
RAND_add(&hentry,
hentry.dwSize, 5);
while (heap_next(&hentry)
+ && (!good || (GetTickCount()-starttime)<MAXDELAY)
&& --entrycnt > 0);
}
}