James Hawkins : msi: MsiCollectUserInfo cannot be called from a custom action (Coverity 565, 566).

Alexandre Julliard julliard at winehq.org
Mon Mar 23 12:34:55 CDT 2009


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

Author: James Hawkins <truiken at gmail.com>
Date:   Sun Mar 22 14:31:13 2009 -0700

msi: MsiCollectUserInfo cannot be called from a custom action (Coverity 565, 566).

---

 dlls/msi/msi.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 93220eb..7cca153 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -2927,7 +2927,11 @@ UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
     if (rc != ERROR_SUCCESS)
         return ERROR_INVALID_PARAMETER;
 
+    /* MsiCollectUserInfo cannot be called from a custom action. */
     package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
+    if (!package)
+        return ERROR_CALL_NOT_IMPLEMENTED;
+
     rc = ACTION_PerformUIAction(package, szFirstRun, -1);
     msiobj_release( &package->hdr );
 
@@ -2949,7 +2953,11 @@ UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
     if (rc != ERROR_SUCCESS)
         return ERROR_INVALID_PARAMETER;
 
+    /* MsiCollectUserInfo cannot be called from a custom action. */
     package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
+    if (!package)
+        return ERROR_CALL_NOT_IMPLEMENTED;
+
     rc = ACTION_PerformUIAction(package, szFirstRun, -1);
     msiobj_release( &package->hdr );
 




More information about the wine-cvs mailing list