Juan Lang : crypt32: Return an empty string from CertGetNameStringW if a name couldn't be found .

Alexandre Julliard julliard at winehq.org
Wed Sep 9 09:57:47 CDT 2009


Module: wine
Branch: master
Commit: 7d831064270ebc37ed94df3f81d2be6c6e50e9df
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7d831064270ebc37ed94df3f81d2be6c6e50e9df

Author: Juan Lang <juan.lang at gmail.com>
Date:   Tue Sep  8 21:55:26 2009 -0700

crypt32: Return an empty string from CertGetNameStringW if a name couldn't be found.

---

 dlls/crypt32/str.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c
index f7821e1..b300b1f 100644
--- a/dlls/crypt32/str.c
+++ b/dlls/crypt32/str.c
@@ -1034,5 +1034,15 @@ DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType,
         FIXME("unimplemented for type %d\n", dwType);
         ret = 0;
     }
+    if (!ret)
+    {
+        if (!pszNameString)
+            ret = 1;
+        else if (cchNameString)
+        {
+            pszNameString[0] = 0;
+            ret = 1;
+        }
+    }
     return ret;
 }




More information about the wine-cvs mailing list