Skip to content
Snippets Groups Projects
Commit d29f8b46 authored by Jay Satiro's avatar Jay Satiro Committed by Daniel Stenberg
Browse files

cyassl: Check for invalid length parameter in Curl_cyassl_random

parent ec319626
No related branches found
No related tags found
No related merge requests found
......@@ -640,7 +640,9 @@ int Curl_cyassl_random(struct SessionHandle *data,
(void)data;
if(InitRng(&rng))
return 1;
if(RNG_GenerateBlock(&rng, entropy, length))
if(length > UINT_MAX)
return 1;
if(RNG_GenerateBlock(&rng, entropy, (unsigned)length))
return 1;
return 0;
}
......
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