From f43a533e3e5b13db559dfb7feed36745d0601e7e Mon Sep 17 00:00:00 2001 From: guido Date: Fri, 4 Jan 2002 13:42:14 +0000 Subject: Fix the coredump that occurs when, from the tfpt prompt, a 'c' command is issued without an argument. --- usr.bin/tftp/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/tftp/main.c') diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index ca2e346..dde8169 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -200,7 +200,7 @@ setpeer(argc, argv) argc = margc; argv = margv; } - if (argc > 3) { + if ((argc < 2) || (argv > 3)) { printf("usage: %s host-name [port]\n", argv[0]); return; } -- cgit v1.1