From e71406451503086c1b6bd65f007cc4a457d60ed1 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 21 Aug 2008 18:03:11 +0100 Subject: [PATCH] crypt32: Don't decrease the size of the buffer, since we're already counting the characters that we're adding to it. --- dlls/crypt32/str.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index 699779fb6e0..b0b09903eb5 100644 --- a/dlls/crypt32/str.c +++ b/dlls/crypt32/str.c @@ -249,7 +249,6 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixA(prefix, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } /* FIXME: handle quoting */ chars = CertRDNValueToStrA( @@ -277,7 +276,6 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, if (psz && csz) { *(psz + ret) = '\0'; - csz--; ret++; } else @@ -406,7 +404,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixW(prefixW, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } else if (prefixA) { @@ -414,7 +411,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixAToW(prefixA, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } /* FIXME: handle quoting */ chars = CertRDNValueToStrW( @@ -442,7 +438,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, if (psz && csz) { *(psz + ret) = '\0'; - csz--; ret++; } else