projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8c0490
)
sslgen.c: fix unreleased Curl_rand() infinite recursion
author
Yang Tse
<yangsita@gmail.com>
Mon, 15 Jul 2013 11:20:44 +0000
(13:20 +0200)
committer
Yang Tse
<yangsita@gmail.com>
Mon, 15 Jul 2013 11:22:08 +0000
(13:22 +0200)
lib/sslgen.c
patch
|
blob
|
history
diff --git
a/lib/sslgen.c
b/lib/sslgen.c
index ba995cb5deb103a6c64633f4ea6f5a9a78b290ec..a633b0c5d1b773878901be51d7093827c30f5b2d 100644
(file)
--- a/
lib/sslgen.c
+++ b/
lib/sslgen.c
@@
-209,9
+209,10
@@
unsigned int Curl_rand(struct SessionHandle *data)
{
struct timeval now = curlx_tvnow();
randseed += (unsigned int) now.tv_usec + (unsigned int)now.tv_sec;
- Curl_rand(data);
- Curl_rand(data);
- Curl_rand(data);
+ randseed = randseed * 1103515245 + 12345;
+ randseed = randseed * 1103515245 + 12345;
+ randseed = randseed * 1103515245 + 12345;
+ seeded = TRUE;
}
}
/* Return an unsigned 32-bit pseudo-random number. */