advapi32: Fix printing NULL strings.
Francois Gouget
fgouget at free.fr
Mon Sep 19 16:27:06 CDT 2011
---
This fixes a crash that occurred in the conformance tests on my Solaris
VMs when tracing was turned on.
dlls/advapi32/crypt.c | 4 ++--
dlls/advapi32/registry.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c
index f0f19ee..31260a8 100644
--- a/dlls/advapi32/crypt.c
+++ b/dlls/advapi32/crypt.c
@@ -545,8 +545,8 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
PWSTR pProvider = NULL, pContainer = NULL;
BOOL ret = FALSE;
- TRACE("(%p, %s, %s, %d, %08x)\n", phProv, pszContainer,
- pszProvider, dwProvType, dwFlags);
+ TRACE("(%p, %s, %s, %d, %08x)\n", phProv, debugstr_a(pszContainer),
+ debugstr_a(pszProvider), dwProvType, dwFlags);
if ( !CRYPT_ANSIToUnicode(pszContainer, &pContainer, -1) )
{
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index d5c4164..758ba08 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -1739,8 +1739,8 @@ LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
LONG ret;
TRACE("(%p,%s,%s,%d,%p,%p,%p=%d)\n",
- hKey, pszSubKey, pszValue, dwFlags, pdwType, pvData, pcbData,
- cbData);
+ hKey, debugstr_a(pszSubKey), debugstr_a(pszValue), dwFlags,
+ pdwType, pvData, pcbData, cbData);
if (pvData && !pcbData)
return ERROR_INVALID_PARAMETER;
--
1.7.5.4
More information about the wine-patches
mailing list