From 8cc16530c46d10f2bcbdfb9836fd5b203d9eed45 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 29 Sep 2013 11:36:53 +0200 Subject: [PATCH] BUG/MINOR: acl: fix improper string size assignment in proxy argument This minor bug was found using the coccinelle script "da.cocci". The len was initialized twice instead of setting the size. It's harmless since no operations are performed on this empty string but needs to be fixed anyway. --- src/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acl.c b/src/acl.c index d9475916e..b6e55ec26 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1158,7 +1158,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->args[0].type = type; expr->args[0].unresolved = 1; expr->args[0].data.str.str = strdup(""); - expr->args[0].data.str.len = 1; + expr->args[0].data.str.size = 1; expr->args[0].data.str.len = 0; arg_list_add(al, &expr->args[0], 0);