[1/2] msi: Allocate MSISCRIPT structure at package creation time.
Hans Leidekker
hans at codeweavers.com
Mon Oct 19 04:13:54 CDT 2009
Commit e3aa2f33d93e1f9cc1ab19b87ad7fd34f490a887 exposed a code path
that dereferences the script pointer before it's initialized.
-Hans
---
dlls/msi/action.c | 1 -
dlls/msi/package.c | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index e08f25a..e108701 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -6394,7 +6394,6 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
MSI_SetPropertyW(package, szAction, szInstall);
- package->script = msi_alloc_zero(sizeof(MSISCRIPT));
package->script->InWhatSequence = SEQUENCE_INSTALL;
if (szPackagePath)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 06e3416..9c92842 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -969,6 +969,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
MSI_SetPropertyW( package, OriginalDatabase, fullpath );
}
+ package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
*pPackage = package;
return ERROR_SUCCESS;
--
1.6.3.3
More information about the wine-patches
mailing list