Commit 2c7d7459 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

reg: Abort 'query' operation when parsing command-line arguments that are not switches.

parent 51e83dec
......@@ -334,9 +334,12 @@ int reg_query(int argc, WCHAR *argvW[])
for (i = 3; i < argc; i++)
{
if (argvW[i][0] == '/' || argvW[i][0] == '-')
{
WCHAR *str = &argvW[i][1];
WCHAR *str;
if (argvW[i][0] != '/' && argvW[i][0] != '-')
goto invalid;
str = &argvW[i][1];
if (!lstrcmpiW(str, L"ve"))
{
......@@ -361,7 +364,6 @@ int reg_query(int argc, WCHAR *argvW[])
goto invalid;
}
}
}
if (value_name && value_empty)
goto invalid;
......
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