Skip to content
Snippets Groups Projects
Commit 9c15325d authored by Yang Tse's avatar Yang Tse
Browse files

sslgen.c: fix unreleased Curl_rand() infinite recursion

parent d8c04909
No related branches found
No related tags found
No related merge requests found
......@@ -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. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment