From: Daniel Stenberg Date: Tue, 1 Apr 2025 07:36:47 +0000 (+0200) Subject: tool_paramhlp: make proto2num skip leading commas better X-Git-Tag: curl-8_13_0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d85c8c49d90fa8c1475832e0a8f1916a04d9a69;p=thirdparty%2Fcurl.git tool_paramhlp: make proto2num skip leading commas better Closes #16892 --- 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;