reg: Avoid possible out-of-bounds memory access when a switch is only a forward slash or hyphen.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-06-09 05:48:29 +00:00 committed by Alexandre Julliard
parent a88c35d0dc
commit 7d962327b1
1 changed files with 1 additions and 1 deletions

View File

@ -937,7 +937,7 @@ int wmain(int argc, WCHAR *argvW[])
value_all = TRUE;
continue;
}
else if (ptr[1])
else if (!ptr[0] || ptr[1])
{
output_message(STRING_INVALID_CMDLINE);
return 1;