Juan Lang : crypt32: Fix off-by-one error in formatting szOID_AUTHORITY_KEY_IDENTIFIER2.
Alexandre Julliard
julliard at winehq.org
Thu Nov 13 08:51:29 CST 2008
Module: wine
Branch: master
Commit: a82454b2ee082c12f6fcd94385e34c7655ea291d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a82454b2ee082c12f6fcd94385e34c7655ea291d
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Nov 12 20:36:33 2008 -0800
crypt32: Fix off-by-one error in formatting szOID_AUTHORITY_KEY_IDENTIFIER2.
---
dlls/crypt32/object.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c
index f5a6483..d639630 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)
{
More information about the wine-cvs
mailing list