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

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 2c7d74594f2bd421f6d904f334171a198a13c66e by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
winesync 2022-01-16 21:06:05 +01:00 committed by Thomas Csovcsity
parent fa6d473e3d
commit 091880d29b
2 changed files with 26 additions and 24 deletions

View file

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

View file

@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
wine: 51e83dec2959ce332264223832abc1a5f09dbf34
wine: 2c7d74594f2bd421f6d904f334171a198a13c66e