mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-03 16:31:08 +01:00
BUG/MEDIUM: cli: fix "help" crashing since recent spelling fixes
I somehow managed to re-break the "help" command in b736458bf ("MEDIUM:
cli: apply spelling fixes for known commands before listing them")
after fixing it once. A null-deref happens when checking the args
early in the processing.
No backport is needed as this was introduced in 2.4-dev12.
This commit is contained in:
parent
acdd47db9d
commit
9c18747823
@ -140,7 +140,7 @@ static char *cli_gen_usage_msg(struct appctx *appctx, char * const *args)
|
||||
/* In case of partial match we'll look for the best matching entries
|
||||
* starting from position <length>
|
||||
*/
|
||||
if (args[length] && *args[length]) {
|
||||
if (args && args[length] && *args[length]) {
|
||||
list_for_each_entry(kw_list, &cli_keywords.list, list) {
|
||||
for (kw = &kw_list->kw[0]; kw->str_kw[0]; kw++) {
|
||||
if (kw->level & ~appctx->cli_level & (ACCESS_MASTER_ONLY|ACCESS_EXPERT))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user