crypt32: Use allocation function with the correct prototype in CMSG_CONTENT_ENCRYPT_INFO.

This commit is contained in:
Alexandre Julliard 2010-12-09 17:43:34 +01:00
parent 331460793c
commit b012ffba58
1 changed files with 13 additions and 2 deletions

View File

@ -1645,6 +1645,17 @@ static BOOL CRYPT_ExportEncryptedKey(CMSG_CONTENT_ENCRYPT_INFO *info, DWORD i,
return ret; return ret;
} }
static LPVOID WINAPI mem_alloc(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
static VOID WINAPI mem_free(LPVOID pv)
{
HeapFree(GetProcessHeap(), 0, pv);
}
static BOOL CContentEncryptInfo_Construct(CMSG_CONTENT_ENCRYPT_INFO *info, static BOOL CContentEncryptInfo_Construct(CMSG_CONTENT_ENCRYPT_INFO *info,
const CMSG_ENVELOPED_ENCODE_INFO_WITH_CMS *in, HCRYPTPROV prov) const CMSG_ENVELOPED_ENCODE_INFO_WITH_CMS *in, HCRYPTPROV prov)
{ {
@ -1701,8 +1712,8 @@ static BOOL CContentEncryptInfo_Construct(CMSG_CONTENT_ENCRYPT_INFO *info,
else else
ret = FALSE; ret = FALSE;
} }
info->pfnAlloc = CryptMemAlloc; info->pfnAlloc = mem_alloc;
info->pfnFree = CryptMemFree; info->pfnFree = mem_free;
return ret; return ret;
} }