tool_paramhlp: make proto2num skip leading commas better

Closes #16892
This commit is contained in:
Daniel Stenberg 2025-04-01 09:36:47 +02:00
parent 66c95f05fa
commit 0d85c8c49d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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;