[WINESYNC] reg: Abort 'add' 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 b2ead1ffcc8d28b488b561e8c5a9e3cc964699a3 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 6c0f70db4d
commit 0a5bdf825b
2 changed files with 39 additions and 37 deletions

View file

@ -222,9 +222,12 @@ int reg_add(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"))
{
@ -263,7 +266,6 @@ int reg_add(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: b80da20656feda99f9c6e749f5cd6d6f3c242cd3
wine: b2ead1ffcc8d28b488b561e8c5a9e3cc964699a3