https://git.reactos.org/?p=reactos.git;a=commitdiff;h=091880d29bd8bcbbe562f9...
commit 091880d29bd8bcbbe562f949a33dfbc5f50f6aae Author: winesync ros-dev@reactos.org AuthorDate: Sun Jan 16 21:06:05 2022 +0100 Commit: Thomas Csovcsity thc.fr13nd@gmail.com CommitDate: Sun Jun 19 13:06:32 2022 +0200
[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 --- base/applications/cmdutils/reg/query.c | 48 ++++++++++++++++++---------------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index 656ac875ec4..cc8f264e780 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -334,32 +334,34 @@ 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 (!lstrcmpiW(str, L"ve")) - { - if (value_empty) goto invalid; - value_empty = TRUE; - continue; - } - else if (!str[0] || str[1]) - goto invalid; + if (argvW[i][0] != '/' && argvW[i][0] != '-') + goto invalid;
- switch (towlower(*str)) - { - case 'v': - if (value_name || !(value_name = argvW[++i])) - goto invalid; - break; - case 's': - if (recurse) goto invalid; - recurse = TRUE; - break; - default: + str = &argvW[i][1]; + + if (!lstrcmpiW(str, L"ve")) + { + if (value_empty) goto invalid; + value_empty = TRUE; + continue; + } + else if (!str[0] || str[1]) + goto invalid; + + switch (towlower(*str)) + { + case 'v': + if (value_name || !(value_name = argvW[++i])) goto invalid; - } + break; + case 's': + if (recurse) goto invalid; + recurse = TRUE; + break; + default: + goto invalid; } }
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 5454758d744..d8c00f2dab7 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 51e83dec2959ce332264223832abc1a5f09dbf34 + wine: 2c7d74594f2bd421f6d904f334171a198a13c66e