From: Willy Tarreau Date: Sun, 29 Sep 2013 09:36:53 +0000 (+0200) Subject: BUG/MINOR: acl: fix improper string size assignment in proxy argument X-Git-Tag: v1.5-dev20~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cc16530c46d10f2bcbdfb9836fd5b203d9eed45;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/acl.c b/src/acl.c index d9475916e6..b6e55ec262 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);