Hugh McMaster : reg: Avoid possible out-of-bounds memory access when a switch is only a forward slash or hyphen.
Alexandre Julliard
julliard at winehq.org
Thu Jun 9 10:35:13 CDT 2016
Module: wine
Branch: master
Commit: 7d962327b12cc0f07681fe46c8d4c5715faeb819
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d962327b12cc0f07681fe46c8d4c5715faeb819
Author: Hugh McMaster <hugh.mcmaster at 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 at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list