Commit 5bb4ed2d authored by Mounir IDRASSI's avatar Mounir IDRASSI Committed by Alexandre Julliard

advapi32: Check for error in CryptEnumProviderTypesA and CryptEnumProvidersA.

parent 521cba2b
......@@ -1139,7 +1139,8 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &strlen);
if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &strlen))
return FALSE;
if ( pszProvName && !(str = CRYPT_Alloc(strlen)) )
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
......@@ -1267,7 +1268,8 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszTypeName, pcbTypeName);
CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &strlen);
if(!CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &strlen))
return FALSE;
if ( pszTypeName && !(str = CRYPT_Alloc(strlen)) )
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
......
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