crypt32: pwszContainerName or pwszProvName could be NULL in CRYPT_KEY_PROV_INFO.
Make behaviour of CRYPT_FixKeyProvInfoPointers match CRYPT_CopyKeyProvInfo, and fix reading CRYPT_KEY_PROV_INFO certificate property from the store. Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cd215bb49b
commit
0e30815636
|
@ -525,13 +525,19 @@ void CRYPT_FixKeyProvInfoPointers(PCRYPT_KEY_PROV_INFO info)
|
||||||
DWORD i, containerLen, provNameLen;
|
DWORD i, containerLen, provNameLen;
|
||||||
LPBYTE data = (LPBYTE)info + sizeof(CRYPT_KEY_PROV_INFO);
|
LPBYTE data = (LPBYTE)info + sizeof(CRYPT_KEY_PROV_INFO);
|
||||||
|
|
||||||
info->pwszContainerName = (LPWSTR)data;
|
if (info->pwszContainerName)
|
||||||
containerLen = (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
{
|
||||||
data += containerLen;
|
info->pwszContainerName = (LPWSTR)data;
|
||||||
|
containerLen = (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||||
|
data += containerLen;
|
||||||
|
}
|
||||||
|
|
||||||
info->pwszProvName = (LPWSTR)data;
|
if (info->pwszProvName)
|
||||||
provNameLen = (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
{
|
||||||
data += provNameLen;
|
info->pwszProvName = (LPWSTR)data;
|
||||||
|
provNameLen = (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||||
|
data += provNameLen;
|
||||||
|
}
|
||||||
|
|
||||||
if (info->cProvParam)
|
if (info->cProvParam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue