From: Willy Tarreau Date: Fri, 16 Jul 2021 14:36:05 +0000 (+0200) Subject: MINOR: init: verify that there is a single word on "-cc" X-Git-Tag: v2.5-dev2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7edc0fde0568d1dafef2aeffd7b5960bb019665c;p=thirdparty%2Fhaproxy.git MINOR: init: verify that there is a single word on "-cc" This adds the exact same restriction as commit 5546c8bdc ("MINOR: cfgparse: Fail when encountering extra arguments in macro") but for the "-cc" command line argument, for the sake of consistency. --- diff --git a/src/haproxy.c b/src/haproxy.c index b5c6a133ba..8a9f50cf8c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1826,7 +1826,7 @@ static void init(int argc, char **argv) exit(2); } - if (err & PARSE_ERR_TOOMANY) { + if ((err & PARSE_ERR_TOOMANY) || *args[1]) { ha_alert("Error in condition: Too many words.\n"); exit(2); }