msi: Validate the parameters of MsiOpenPackage.

This commit is contained in:
James Hawkins 2007-12-16 20:23:27 -06:00 committed by Alexandre Julliard
parent 8fab39cc60
commit f933dd8b4f
2 changed files with 8 additions and 5 deletions

View File

@ -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);

View File

@ -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;