mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
improve return code check on RAND_bytes call
git-svn-id: http://encfs.googlecode.com/svn/trunk@25 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
475658a255
commit
e1d997fb9e
@ -404,7 +404,7 @@ CipherKey SSL_Cipher::newRandomKey()
|
||||
unsigned char tmpBuf[ bufLen ];
|
||||
// to avoid warnings of uninitialized data from valgrind
|
||||
memset(tmpBuf, 0, sizeof(tmpBuf));
|
||||
if(RAND_bytes( tmpBuf, bufLen ) == 0)
|
||||
if(RAND_bytes( tmpBuf, bufLen ) != 1)
|
||||
{
|
||||
char errStr[120]; // specs require string at least 120 bytes long..
|
||||
unsigned long errVal = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user