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;
|
||||
LPBYTE data = (LPBYTE)info + sizeof(CRYPT_KEY_PROV_INFO);
|
||||
|
||||
info->pwszContainerName = (LPWSTR)data;
|
||||
containerLen = (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
data += containerLen;
|
||||
if (info->pwszContainerName)
|
||||
{
|
||||
info->pwszContainerName = (LPWSTR)data;
|
||||
containerLen = (lstrlenW(info->pwszContainerName) + 1) * sizeof(WCHAR);
|
||||
data += containerLen;
|
||||
}
|
||||
|
||||
info->pwszProvName = (LPWSTR)data;
|
||||
provNameLen = (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
data += provNameLen;
|
||||
if (info->pwszProvName)
|
||||
{
|
||||
info->pwszProvName = (LPWSTR)data;
|
||||
provNameLen = (lstrlenW(info->pwszProvName) + 1) * sizeof(WCHAR);
|
||||
data += provNameLen;
|
||||
}
|
||||
|
||||
if (info->cProvParam)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue