Jeff Latimer : crypt32: Fix possible dereference of NULL ptr.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 26 07:11:49 CDT 2007


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

Author: Jeff Latimer <lats at yless4u.com.au>
Date:   Sun Jun 24 20:06:49 2007 +1000

crypt32: Fix possible dereference of NULL ptr.

---

 dlls/crypt32/str.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c
index 6d879c5..c524b2b 100644
--- a/dlls/crypt32/str.c
+++ b/dlls/crypt32/str.c
@@ -899,8 +899,9 @@ DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType,
                 }
             }
         }
-        ret = CertRDNValueToStrW(nameAttr->dwValueType, &nameAttr->Value,
-         pszNameString, cchNameString);
+        if (nameAttr)
+            ret = CertRDNValueToStrW(nameAttr->dwValueType, &nameAttr->Value,
+             pszNameString, cchNameString);
         if (info)
             LocalFree(info);
         break;




More information about the wine-cvs mailing list