From 7edc0fde0568d1dafef2aeffd7b5960bb019665c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 16 Jul 2021 16:36:05 +0200 Subject: [PATCH] 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. --- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index b5c6a133b..8a9f50cf8 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); }