Re: Yet another scotty snapshot.

Erik Schoenfelder (schoenfr@ibr.cs.tu-bs.de)
Fri, 10 Mar 1995 13:08:05 +0100

Hi!

On Fri, 10 Mar 1995 09:44:23 +0000 (GMT),
Ross Wakelin <rossw@march.co.uk> said:

Ross> There is a bug in straps.c that appears on our SVR4 boxes....

Ross> There is an int (dlen) and a struct sockaddr_us (daddr) that
Ross> are used on the accept when a local client connects to the
Ross> unix domain local socket.

Ross> These variables are generated on the stack (for main) and not
Ross> initialised.

Fixed. Thank's for your bugreport.

Erik

--
*** snmp/straps.c-merk	Fri Mar 10 13:06:07 1995
--- snmp/straps.c	Fri Mar 10 13:06:13 1995
***************
*** 204,209 ****
--- 204,212 ----
  	    }
  	  else
  	    {
+ 		memset ((char *) &daddr, 0, sizeof(daddr));
+ 		dlen = sizeof (daddr);
+ 
  		rc = accept (serv_s, (struct sockaddr *) &daddr, &dlen);
  		if (rc < 0)
  		  {