[WINESYNC] msi: Check for a NULL return from deformat_string() when checking for failure.

An empty string is valid, and can occur if e.g. a nonexistent property is
expanded.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51091
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 814f18ab756cd69158ce893c4f7898e14d3e46dc by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-13 23:41:13 +01:00 committed by Mark Jansen
parent 8975937c00
commit de80f2a3c1
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 52 additions and 25 deletions

View file

@ -252,7 +252,9 @@ static const char env_environment_dat[] =
"Var27\t+-MSITESTVAR21\t[~];1\tOne\n"
"Var28\t-MSITESTVAR22\t1\tOne\n"
"Var29\t-MSITESTVAR23\t2\tOne\n"
"Var30\t*MSITESTVAR100\t1\tOne\n";
"Var30\t*MSITESTVAR100\t1\tOne\n"
"Var31\t-=MSITESTVAR24\t[SERVNAME]\tOne\n"
"Var32\t-=MSITESTVAR25\t[bogus_prop]\tOne\n";
static const char service_install_dat[] =
"ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
@ -5047,6 +5049,7 @@ static void test_envvar(void)
CHECK_REG_STR(env, "MSITESTVAR19", "1");
CHECK_REG_STR(env, "MSITESTVAR20", "1");
CHECK_REG_STR(env, "MSITESTVAR21", "1");
CHECK_REG_STR(env, "MSITESTVAR24", "TestService");
CHECK_REG_STR(env2, "MSITESTVAR100", "1");
res = RegSetValueExA(env, "MSITESTVAR22", 0, REG_SZ, (const BYTE *)"1", 2);
@ -5055,6 +5058,9 @@ static void test_envvar(void)
res = RegSetValueExA(env, "MSITESTVAR23", 0, REG_SZ, (const BYTE *)"1", 2);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = RegDeleteValueA(env, "MSITESTVAR25");
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(!r, "got %u\n", r);