fromunix, frominet are declared as automatic variables in main()
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 18 Apr 1994 00:31:18 +0000 (16:31 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 18 Apr 1994 00:31:18 +0000 (16:31 -0800)
and aren't bzero()'d before use.
From: "Chris G. Demetriou" <cgd@nobozo.CS.Berkeley.EDU>

SCCS-vsn: usr.sbin/lpr/lpd/lpd.c 8.4

usr/src/usr.sbin/lpr/lpd/lpd.c

index 39c5631..2690d90 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 1983, 1993
+ * Copyright (c) 1983, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
  *
  *
  *     The Regents of the University of California.  All rights reserved.
  *
  *
@@ -8,12 +8,12 @@
 
 #ifndef lint
 static char copyright[] =
 
 #ifndef lint
 static char copyright[] =
-"@(#) Copyright (c) 1983, 1993\n\
+"@(#) Copyright (c) 1983, 1993, 1994\n\
        The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
 #ifndef lint
        The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)lpd.c      8.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)lpd.c      8.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -195,6 +195,8 @@ main(argc, argv)
        /*
         * Main loop: accept, do a request, continue.
         */
        /*
         * Main loop: accept, do a request, continue.
         */
+       memset(&frominet, 0, sizeof(frominet));
+       memset(&fromunix, 0, sizeof(fromunix));
        for (;;) {
                int domain, nfds, s;
                fd_set readfds;
        for (;;) {
                int domain, nfds, s;
                fd_set readfds;