Hugh McMaster : reg: Do not allow /v and /ve to be used together in the ' add' function.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 10 11:11:09 CST 2016


Module: wine
Branch: master
Commit: c0b26a649e43ea4fce9303cfdec5ef8fd8173964
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c0b26a649e43ea4fce9303cfdec5ef8fd8173964

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Wed Feb 10 22:23:15 2016 +1100

reg: Do not allow /v and /ve to be used together in the 'add' function.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/reg/reg.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 322fa90..8578959 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -326,6 +326,12 @@ static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
         return 1;
     }
 
+    if (value_name && value_empty)
+    {
+        output_message(STRING_INVALID_CMDLINE);
+        return 1;
+    }
+
     if(RegCreateKeyW(root,p,&subkey)!=ERROR_SUCCESS)
     {
         output_message(STRING_INVALID_KEY);




More information about the wine-cvs mailing list