Juan Lang : cryptui: Don't crash if pImportSrc is NULL.

Alexandre Julliard julliard at winehq.org
Mon Oct 27 08:02:56 CDT 2008


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri Oct 24 13:44:00 2008 -0700

cryptui: Don't crash if pImportSrc is NULL.

---

 dlls/cryptui/main.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 482bd14..b31763d 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -117,6 +117,12 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
 
     if (!(dwFlags & CRYPTUI_WIZ_NO_UI)) FIXME("UI not implemented\n");
 
+    if (!pImportSrc)
+    {
+        SetLastError(E_INVALIDARG);
+        return FALSE;
+    }
+
     if (pImportSrc->dwSubjectChoice != CRYPTUI_WIZ_IMPORT_SUBJECT_FILE)
     {
         FIXME("source type not implemented: %u\n", pImportSrc->dwSubjectChoice);




More information about the wine-cvs mailing list