[5/6] wbemprox: Avoid an exception when tracing the principal name in IClientSecurity::SetBlanket.

Hans Leidekker hans at codeweavers.com
Fri Jun 29 06:40:35 CDT 2012


---
 dlls/wbemprox/services.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c
index 2e8a34a..8edd2f6 100644
--- a/dlls/wbemprox/services.c
+++ b/dlls/wbemprox/services.c
@@ -106,8 +106,12 @@ static HRESULT WINAPI client_security_SetBlanket(
     void *pAuthInfo,
     DWORD Capabilities )
 {
+    static const OLECHAR defaultW[] =
+        {'<','C','O','L','E','_','D','E','F','A','U','L','T','_','P','R','I','N','C','I','P','A','L','>',0};
+    const OLECHAR *princname = (pServerPrincName == COLE_DEFAULT_PRINCIPAL) ? defaultW : pServerPrincName;
+
     FIXME("%p, %p, %u, %u, %s, %u, %u, %p, 0x%08x\n", iface, pProxy, AuthnSvc, AuthzSvc,
-          debugstr_w(pServerPrincName), AuthnLevel, ImpLevel, pAuthInfo, Capabilities);
+          debugstr_w(princname), AuthnLevel, ImpLevel, pAuthInfo, Capabilities);
     return WBEM_NO_ERROR;
 }
 
-- 
1.7.10







More information about the wine-patches mailing list