crypt32: Initialize salt correctly.

This commit is contained in:
Hans Leidekker 2009-06-04 10:11:55 +02:00 committed by Alexandre Julliard
parent 7b40a2fa95
commit 0376ec38b0
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ BOOL fill_protect_data(struct protect_data_t * pInfo, LPCWSTR szDataDescr,
if ((pInfo->salt.pbData=CryptMemAlloc(CRYPT32_PROTECTDATA_SALT_LEN))) if ((pInfo->salt.pbData=CryptMemAlloc(CRYPT32_PROTECTDATA_SALT_LEN)))
{ {
/* generate random salt */ /* generate random salt */
if (!CryptGenRandom(hProv, pInfo->salt.cbData, pInfo->salt.pbData)) if (!CryptGenRandom(hProv, CRYPT32_PROTECTDATA_SALT_LEN, pInfo->salt.pbData))
{ {
ERR("CryptGenRandom\n"); ERR("CryptGenRandom\n");
free_protect_data(pInfo); free_protect_data(pInfo);