Hugh McMaster : reg: Avoid possible out-of-bounds memory access when a switch is only a forward slash or hyphen.
Module: wine Branch: master Commit: 7d962327b12cc0f07681fe46c8d4c5715faeb819 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d962327b12cc0f07681fe46c8... Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jun 9 05:48:29 2016 +0000 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(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 7d9c972..20df2dd 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -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;
participants (1)
-
Alexandre Julliard