Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!foxhound.dsto.gov.au!fang.dsto.gov.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!netsys!pagesat.net!news.cerf.net!mvb.saic.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!news.funet.fi!nntp.hut.fi!nntp!jvh From: jvh@cs.hut.fi (Johannes Helander) Newsgroups: comp.os.386bsd.bugs Subject: lpd and mount_kernfs bugs and fixes Date: 20 Apr 1994 18:08:35 GMT Organization: Helsinki University of Technology, CS Lab. Lines: 40 Distribution: world Message-ID: <JVH.94Apr20210836@hutcs.cs.hut.fi> NNTP-Posting-Host: hutcs.cs.hut.fi These simple bugs might have been fixed but were present in NetBSD 0.9 at least so I'm hoping they will be fixed in all the BSD variants where they are still present. The original code assumes that the stack contains zeroed memory which is not necessarily true. The fixes are trivial, see below. Johannes *** mount_kernfs.c.netbsd09 Wed Apr 20 20:46:04 1994 --- mount_kernfs.c Wed Apr 20 19:12:18 1994 *************** *** 50,56 **** extern int optind; int ch; int usage = 0; ! int mntflags; char *dummy; char *mountpt; int rc; --- 50,56 ---- extern int optind; int ch; int usage = 0; ! int mntflags = 0; char *dummy; char *mountpt; int rc; *** lpd.c.netbsd09 Wed Apr 20 20:47:52 1994 --- lpd.c Wed Apr 20 20:18:12 1994 *************** *** 176,181 **** --- 176,182 ---- } sin.sin_family = AF_INET; sin.sin_port = sp->s_port; + sin.sin_addr.s_addr = INADDR_ANY; if (bind(finet, (struct sockaddr *)&sin, sizeof(sin)) < 0) { syslog(LOG_ERR, "bind: %m"); mcleanup();