]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_paramhlp: make proto2num skip leading commas better
authorDaniel Stenberg <daniel@haxx.se>
Tue, 1 Apr 2025 07:36:47 +0000 (09:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 1 Apr 2025 09:30:05 +0000 (11:30 +0200)
Closes #16892

src/tool_paramhlp.c

index 3548e509f6879e472a9961c6fbc9260f60f76589..068b0d442bf058c6c4ce9a513832b6892d3b48e8 100644 (file)
@@ -437,8 +437,13 @@ ParameterError proto2num(struct OperationConfig *config,
     size_t plen;
     enum e_action { allow, deny, set } action = allow;
 
-    if(next)
+    if(next) {
+      if(str == next) {
+        str++;
+        continue;
+      }
       plen = next - str - 1;
+    }
     else
       plen = strlen(str) - 1;