Commit a82454b2 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Fix off-by-one error in formatting szOID_AUTHORITY_KEY_IDENTIFIER2.

parent 1c35b251
......@@ -1095,7 +1095,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityKeyId2(DWORD dwCertEncodingType,
size = bytesNeeded;
ret = CRYPT_FormatKeyId(&info->KeyId, str, &size);
if (ret)
str += size / sizeof(WCHAR);
str += size / sizeof(WCHAR) - 1;
}
if (info->AuthorityCertIssuer.cAltEntry)
{
......@@ -1112,7 +1112,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityKeyId2(DWORD dwCertEncodingType,
ret = CRYPT_FormatCertIssuer(dwFormatStrType,
&info->AuthorityCertIssuer, str, &size);
if (ret)
str += size / sizeof(WCHAR);
str += size / sizeof(WCHAR) - 1;
}
if (info->AuthorityCertSerialNumber.cbData)
{
......
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