Hi,

the user input isn't checked for errors and validity. Quick fix:

Stella:/tmp/netkit-tftp-0.17/tftp# diff -urN main.c.org main.c
diff -urN main.c.org main.c
--- main.c.org  2008-12-28 11:50:44.000000000 +0100
+++ main.c      2008-12-28 11:50:40.000000000 +0100
@@ -209,7 +209,10 @@
                argc = margc;
                argv = margv;
        }
-       if (argc > 3) {
+        /* We should have 2 args now: the cmd and its
+         * parameter. If not, we bail out here.
+         */
+       if (argc != 2) {
                printf("usage: %s host-name [port]\n", argv[0]);
                return;
        }


Regards
hmw


-- 
biff4emacsen - A biff-like tool for (X)Emacs
http://www.c0t0d0s0.de/biff4emacsen/biff4emacsen.html
Flood - Your friendly network packet generator
http://www.c0t0d0s0.de/flood/flood.html



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to