BUG/MINOR: acl: acl parser does not recognize empty converter list
Commit 348971e (MEDIUM: acl: use the fetch syntax 'fetch(args),conv(),conv()'
into the ACL keyword) introduced a regression in the ACL parser. The second
argument of an ACL keyword is now mistakenly confused with a converter.
This bug is post-dev19 and does not require any backport.
diff --git a/src/acl.c b/src/acl.c
index e8d4dc3..95b559c 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -251,6 +251,7 @@
memprintf(err, "in argument to '%s', %s", expr->kw, *err);
goto out_free_expr;
}
+ arg = end;
}
else if (ARGM(expr->smp->fetch->arg_mask) == 1) {
int type = (expr->smp->fetch->arg_mask >> 4) & 15;
@@ -308,7 +309,10 @@
*/
/* look for the begining of the converters list */
- arg = strchr(args[0], ',');
+ if (arg)
+ arg = strchr(arg, ',');
+ else
+ arg = strchr(args[0], ',');
if (arg) {
prev_type = expr->smp->fetch->out_type;
while (1) {