Commit 62851fdb authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

Fix alloc failure check in CryptEnumProvidersW.

parent 830fb08b
...@@ -1012,7 +1012,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved, ...@@ -1012,7 +1012,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
pdwProvType, pszProvName, pcbProvName); pdwProvType, pszProvName, pcbProvName);
strlen = *pcbProvName / sizeof(WCHAR); strlen = *pcbProvName / sizeof(WCHAR);
if ( pszProvName && (str = CRYPT_Alloc(strlen)) ) if ( pszProvName && !(str = CRYPT_Alloc(strlen)) )
CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY); CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
ret = CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &strlen); ret = CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &strlen);
if (str) if (str)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment