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

This commit is contained in:
Juan Lang 2008-11-12 20:36:33 -08:00 committed by Alexandre Julliard
parent 1c35b251e8
commit a82454b2ee
1 changed files with 2 additions and 2 deletions

View File

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