aboutsummaryrefslogtreecommitdiff
path: root/src/eclat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2018-03-19 13:32:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2018-03-19 13:33:02 +0200
commit36c4750dc457f0e1dd74af628a0a4aaa1f940a47 (patch)
tree1ea45a066925c1760f06e76a7bae410c91396d07 /src/eclat.c
parent7d00b6cd95458a14dfed8915f8503a8d710abe45 (diff)
downloadeclat-36c4750dc457f0e1dd74af628a0a4aaa1f940a47.tar.gz
eclat-36c4750dc457f0e1dd74af628a0a4aaa1f940a47.tar.bz2
Fix coredump
* src/eclat.c (find_command_name): Avoid calling ident_matches with NULL argument.
Diffstat (limited to 'src/eclat.c')
-rw-r--r--src/eclat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eclat.c b/src/eclat.c
index 5326c9e..12b4dd1 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -400,10 +400,13 @@ find_command_name(const char *name)
err("ambiguous command %s:", name);
err(" %s", match->ident);
err(" %s", cp->ident);
- while (++cp < cmdtab + cmdcnt)
+ while (++cp < cmdtab + cmdcnt) {
+ if (!cp->ident)
+ continue;
if (ident_matches(cp->ident, name) !=
NO_MATCH)
err(" %s", cp->ident);
+ }
exit(EX_USAGE);
}
}

Return to:

Send suggestions and report system problems to the System administrator.