James Hawkins : msi: Validate the parameters of MsiOpenPackage.
Alexandre Julliard
julliard at winehq.org
Mon Dec 17 06:41:44 CST 2007
Module: wine
Branch: master
Commit: f933dd8b4f4905910512be58f811c6632fa0d675
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f933dd8b4f4905910512be58f811c6632fa0d675
Author: James Hawkins <truiken at gmail.com>
Date: Sun Dec 16 20:23:27 2007 -0600
msi: Validate the parameters of MsiOpenPackage.
---
dlls/msi/package.c | 8 +++++++-
dlls/msi/tests/package.c | 5 +----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 5c42cd8..58861d3 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -932,9 +932,15 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
TRACE("%s %08x %p\n", debugstr_w(szPackage), dwOptions, phPackage );
- if( szPackage == NULL )
+ if( !szPackage || !phPackage )
return ERROR_INVALID_PARAMETER;
+ if ( !*szPackage )
+ {
+ FIXME("Should create an empty database and package.");
+ return ERROR_FUNCTION_FAILED;
+ }
+
if( dwOptions )
FIXME("dwOptions %08x not supported\n", dwOptions);
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index f4b0a4d..af9b786 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -2056,10 +2056,7 @@ static void test_msipackage(void)
/* NULL hProduct */
r = MsiOpenPackage(msifile, NULL);
- todo_wine
- {
- ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- }
+ ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
name[0]='#';
name[1]=0;
More information about the wine-cvs
mailing list