From 0d85c8c49d90fa8c1475832e0a8f1916a04d9a69 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Apr 2025 09:36:47 +0200 Subject: [PATCH] tool_paramhlp: make proto2num skip leading commas better Closes #16892 --- src/tool_paramhlp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 3548e509f6..068b0d442b 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -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; -- 2.47.2