mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
crypt32: Properly NULL-terminate decoded UTF8 strings.
This commit is contained in:
parent
f290ec4961
commit
65e8bf6f48
@ -1724,9 +1724,8 @@ static BOOL CRYPT_AsnDecodeUnicodeNameValueInternal(const BYTE *pbEncoded,
|
||||
case ASN_UTF8STRING:
|
||||
value->Value.cbData = MultiByteToWideChar(CP_UTF8, 0,
|
||||
(LPCSTR)pbEncoded + 1 + lenBytes, dataLen,
|
||||
str, bytesNeeded - sizeof(CERT_NAME_VALUE)) * 2;
|
||||
value->Value.pbData[value->Value.cbData / sizeof(WCHAR)]
|
||||
= 0;
|
||||
str, bytesNeeded - sizeof(CERT_NAME_VALUE)) * sizeof(WCHAR);
|
||||
*(WCHAR *)(value->Value.pbData + value->Value.cbData) = 0;
|
||||
value->Value.cbData += sizeof(WCHAR);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user