mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 03:55:03 -05:00
cyassl: Check for invalid length parameter in Curl_cyassl_random
This commit is contained in:
parent
ec31962640
commit
d29f8b460c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user