mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows: correct lock issue in RandgetBytes by releasing critical section in case of error.
This commit is contained in:
@@ -363,6 +363,7 @@ BOOL RandgetBytes (unsigned char *buf, int len, BOOL forceSlowPoll)
|
|||||||
{
|
{
|
||||||
Error ("ERR_NOT_ENOUGH_RANDOM_DATA");
|
Error ("ERR_NOT_ENOUGH_RANDOM_DATA");
|
||||||
len = RNG_POOL_SIZE;
|
len = RNG_POOL_SIZE;
|
||||||
|
LeaveCriticalSection (&critRandProt);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user