From a82454b2ee082c12f6fcd94385e34c7655ea291d Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 12 Nov 2008 20:36:33 -0800 Subject: [PATCH] crypt32: Fix off-by-one error in formatting szOID_AUTHORITY_KEY_IDENTIFIER2. --- dlls/crypt32/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c index f5a64839c77..d639630cfaa 100644 --- a/dlls/crypt32/object.c +++ b/dlls/crypt32/object.c @@ -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) {