Robin Farine writes:
authorEric Andersen <andersen@codepoet.org>
Tue, 22 Jun 2004 08:40:54 +0000 (08:40 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 22 Jun 2004 08:40:54 +0000 (08:40 -0000)
Package: BusyBox
Version: 1.0.0-pre10

Passing the -q <integer> option to inetd causes it to dereference an
invalid pointer (optarg). The attached patch provides a fix to this
problem.

Robin

networking/inetd.c

index 4440a2d..169cc87 100644 (file)
@@ -771,7 +771,7 @@ extern int inetd_main(int argc, char *argv[])
 #endif /* uClinux */
 
        if(opt & 1) {
-                       global_queuelen = atoi(optarg);
+                       global_queuelen = atoi(sq);
                        if (global_queuelen < 8) global_queuelen=8;
                }
        argc -= optind;