From: Andrew Nguyen arethusa26@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52687 --- dlls/msi/package.c | 13 ++++--------- dlls/msi/tests/install.c | 37 ++++++++++++------------------------- 2 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c index fb5463823e3..617a937af2c 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1107,13 +1107,8 @@ static UINT parse_suminfo( MSISUMMARYINFO *si, MSIPACKAGE *package ) TRACE("template: %s\n", debugstr_w(template));
p = wcschr( template, ';' ); - if (!p) - { - WARN("invalid template string %s\n", debugstr_w(template)); - free( template ); - return ERROR_PATCH_PACKAGE_INVALID; - } - *p = 0; + if (p) *p++ = 0; + platform = template; if ((q = wcschr( platform, ',' ))) *q = 0; package->platform = parse_platform( platform ); @@ -1129,8 +1124,8 @@ static UINT parse_suminfo( MSISUMMARYINFO *si, MSIPACKAGE *package ) free( template ); return ERROR_INSTALL_PLATFORM_UNSUPPORTED; } - p++; - if (!*p) + + if (!p || !*p) { free( template ); return ERROR_SUCCESS; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index d29eedf78a3..3bf28cc1e54 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -5551,12 +5551,9 @@ static void test_package_validation(void) create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "");
r = MsiInstallProductA(msifile, NULL); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); - ok(delete_pf("msitest", FALSE), "directory does not exist\n"); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n");
DeleteFileA(msifile); create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, ";"); @@ -5570,12 +5567,9 @@ static void test_package_validation(void) create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Intel");
r = MsiInstallProductA(msifile, NULL); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); - ok(delete_pf("msitest", FALSE), "directory does not exist\n"); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n");
DeleteFileA(msifile); create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 100, "Intel;"); @@ -5611,7 +5605,6 @@ static void test_package_validation(void) create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "0");
r = MsiInstallProductA(msifile, NULL); - todo_wine ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r);
DeleteFileA(msifile); @@ -5723,12 +5716,9 @@ static void test_package_validation(void) create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64");
r = MsiInstallProductA(msifile, NULL); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); - ok(delete_pf("msitest", FALSE), "directory does not exist\n"); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); } else if (is_wow64) { @@ -5768,12 +5758,9 @@ static void test_package_validation(void) create_database_template(msifile, pv_tables, ARRAY_SIZE(pv_tables), 200, "x64");
r = MsiInstallProductA(msifile, NULL); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); - ok(delete_pf("msitest", FALSE), "directory does not exist\n"); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); } else {