Hans Leidekker : msi: Don' t crash if no working directory is specified for custom action type 34.
Alexandre Julliard
julliard at winehq.org
Mon Jul 9 14:56:38 CDT 2012
Module: wine
Branch: master
Commit: f55ee1a21291ab1f0ad3c4cf010fecd4d95b5e92
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f55ee1a21291ab1f0ad3c4cf010fecd4d95b5e92
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Jul 9 11:08:06 2012 +0200
msi: Don't crash if no working directory is specified for custom action type 34.
---
dlls/msi/custom.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index c1aa627..88dcf87 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -935,13 +935,15 @@ static UINT HANDLE_CustomType50(MSIPACKAGE *package, LPCWSTR source,
static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source,
LPCWSTR target, const INT type, LPCWSTR action)
{
- const WCHAR *workingdir;
+ const WCHAR *workingdir = NULL;
HANDLE handle;
WCHAR *cmd;
- workingdir = msi_get_target_folder( package, source );
- if (!workingdir) return ERROR_FUNCTION_FAILED;
-
+ if (source)
+ {
+ workingdir = msi_get_target_folder( package, source );
+ if (!workingdir) return ERROR_FUNCTION_FAILED;
+ }
deformat_string( package, target, &cmd );
if (!cmd) return ERROR_FUNCTION_FAILED;
More information about the wine-cvs
mailing list