[PATCH 2/6] reg: Do not allow /v and /ve to be used together in the 'add' function

Hugh McMaster hugh.mcmaster at outlook.com
Wed Feb 10 05:23:15 CST 2016


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 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);
-- 
1.9.1




More information about the wine-patches mailing list