mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-26 07:55:01 +00:00
Prevents segm. fault on unknown option
This commit is contained in:
parent
51c3256355
commit
dc5c110e4a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3717
@ -88,6 +88,11 @@ main(argc, argv)
|
||||
|
||||
p = lookup(&argv[0][1]);
|
||||
if (p == (struct cmdtab *)-1) {
|
||||
fprintf(stderr, "%s: ambiguous request\n",
|
||||
&argv[0][1]);
|
||||
exit(1);
|
||||
}
|
||||
if (p == (struct cmdtab *)0) {
|
||||
fprintf(stderr, "%s: unknown request\n",
|
||||
&argv[0][1]);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user