crypt32: Fix printing NULL strings.
Francois Gouget
fgouget at free.fr
Mon Sep 19 16:26:49 CDT 2011
---
This fixes a crash that occurred in the conformance tests on my Solaris
VMs when tracing was turned on.
dlls/crypt32/chain.c | 2 +-
dlls/crypt32/oid.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 2c6732d..c5f6742 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -1668,7 +1668,7 @@ static LPCSTR filetime_to_str(const FILETIME *time)
char dateFmt[80]; /* sufficient for all versions of LOCALE_SSHORTDATE */
SYSTEMTIME sysTime;
- if (!time) return NULL;
+ if (!time) return "(null)";
GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt,
sizeof(dateFmt) / sizeof(dateFmt[0]));
diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c
index 9f998d9..d6b26f7 100644
--- a/dlls/crypt32/oid.c
+++ b/dlls/crypt32/oid.c
@@ -614,8 +614,8 @@ BOOL WINAPI CryptRegisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
HKEY hKey;
LPSTR szKey;
- TRACE("(%x, %s, %s, %s, %s)\n", dwEncodingType, pszFuncName,
- debugstr_a(pszOID), debugstr_w(pwszDll), pszOverrideFuncName);
+ TRACE("(%x, %s, %s, %s, %s)\n", dwEncodingType, debugstr_a(pszFuncName),
+ debugstr_a(pszOID), debugstr_w(pwszDll), debugstr_a(pszOverrideFuncName));
/* Native does nothing pwszDll is NULL */
if (!pwszDll)
--
1.7.5.4
More information about the wine-patches
mailing list