mirror of
https://git.savannah.gnu.org/git/inetutils.git
synced 2026-01-12 00:19:39 +08:00
telnet: Fix crash on 'help help' command.
Reported by AiDai in <https://lists.gnu.org/archive/html/bug-inetutils/2021-12/msg00009.html> and debugged and tiny patch by Erik Auerswald in <https://lists.gnu.org/archive/html/bug-inetutils/2022-02/msg00009.html>. * telnet/commands.c (help): Don't crash on empty c->help.
This commit is contained in:
@@ -3097,7 +3097,7 @@ help (int argc, char *argv[])
|
||||
printf ("?Ambiguous help command %s\n", arg);
|
||||
else if (c == (Command *) 0)
|
||||
printf ("?Invalid help command %s\n", arg);
|
||||
else
|
||||
else if (c->help)
|
||||
printf ("%s\n", c->help);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user