sslgen.c: fix unreleased Curl_rand() infinite recursion

This commit is contained in:
Yang Tse 2013-07-15 13:20:44 +02:00
parent d8c04909fa
commit 9c15325d34
1 changed files with 4 additions and 3 deletions

View File

@ -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. */