projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c52ec
)
MINOR: init: verify that there is a single word on "-cc"
author
Willy Tarreau
<w@1wt.eu>
Fri, 16 Jul 2021 14:36:05 +0000
(16:36 +0200)
committer
Willy Tarreau
<w@1wt.eu>
Fri, 16 Jul 2021 17:18:41 +0000
(19:18 +0200)
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
patch
|
blob
|
history
diff --git
a/src/haproxy.c
b/src/haproxy.c
index
b5c6a13
..
8a9f50c
100644
(file)
--- 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);
}