Commit b32c643c authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Handle escaped double quotes in command line parsing.

parent 2cbeb20d
......@@ -229,7 +229,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
break;
case '"':
state = state_quote;
if (in_quotes) count--;
if (in_quotes && p[1] != '\"') count--;
else count++;
break;
default:
......@@ -267,7 +267,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
switch (*p)
{
case '"':
if (in_quotes) count--;
if (in_quotes && p[1] != '\"') count--;
else count++;
break;
case ' ':
......
......@@ -6350,6 +6350,18 @@ static void test_command_line_parsing(void)
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
cmd = "P=\"\"\"one\"\"\" Q=\"two\"";
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
cmd = "P=\"one \"\"two\"\"\" Q=\"three\"";
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
cmd = "P=\"\"\"one\"\" two\" Q=\"three\"";
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
DeleteFile(msifile);
RemoveDirectory("msitest");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment