From 399e5b4411babf281130cb33fa563b4d701de467 Mon Sep 17 00:00:00 2001 From: Dima Ruban Date: Fri, 17 Feb 1995 03:57:00 +0000 Subject: Security fixes. CERT Advisory CA-95:03.telnet.encryption Obtained from: CERT --- secure/usr.bin/telnet/commands.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'secure/usr.bin') diff --git a/secure/usr.bin/telnet/commands.c b/secure/usr.bin/telnet/commands.c index a7224d18ac30..dbbac4961c30 100644 --- a/secure/usr.bin/telnet/commands.c +++ b/secure/usr.bin/telnet/commands.c @@ -1915,8 +1915,8 @@ struct authlist { }; extern int - auth_enable P((int)), - auth_disable P((int)), + auth_enable P((char *)), + auth_disable P((char *)), auth_status P((void)); static int auth_help P((void)); @@ -1955,6 +1955,12 @@ auth_cmd(argc, argv) { struct authlist *c; + if (argc < 2) { + fprintf(stderr, + "Need an argument to 'auth' command. 'auth ?' for help.\n"); + return 0; + } + c = (struct authlist *) genget(argv[1], (char **) AuthList, sizeof(struct authlist)); if (c == 0) { @@ -2011,7 +2017,7 @@ struct encryptlist EncryptList[] = { EncryptEnable, 1, 1, 2 }, { "disable", "Disable encryption. ('encrypt enable ?' for more)", EncryptDisable, 0, 1, 2 }, - { "type", "Set encryptiong type. ('encrypt type ?' for more)", + { "type", "Set encryption type. ('encrypt type ?' for more)", EncryptType, 0, 1, 1 }, { "start", "Start encryption. ('encrypt start ?' for more)", EncryptStart, 1, 0, 1 }, @@ -2055,6 +2061,12 @@ encrypt_cmd(argc, argv) { struct encryptlist *c; + if (argc < 2) { + fprintf(stderr, + "Need an argument to 'encrypt' command. 'encrypt ?' for help.\n"); + return 0; + } + c = (struct encryptlist *) genget(argv[1], (char **) EncryptList, sizeof(struct encryptlist)); if (c == 0) { -- cgit v1.3