Module: wine Branch: master Commit: e71406451503086c1b6bd65f007cc4a457d60ed1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e71406451503086c1b6bd65f00...
Author: Huw Davies huw@codeweavers.com Date: Thu Aug 21 18:03:11 2008 +0100
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 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index 699779f..b0b0990 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