From owner-freebsd-current Thu Feb 29 14:59:21 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA16537 for current-outgoing; Thu, 29 Feb 1996 14:59:21 -0800 (PST) Received: from veda.is (veda.is [193.4.230.1]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id OAA16203 for ; Thu, 29 Feb 1996 14:53:59 -0800 (PST) Received: (from adam@localhost) by veda.is (8.7.4/8.7.3) id WAA03149; Thu, 29 Feb 1996 22:41:32 GMT From: Adam David Message-Id: <199602292241.WAA03149@veda.is> Subject: Re: ypserv: ypproc_master To: wpaul@ctr.columbia.edu (Bill Paul) Date: Thu, 29 Feb 1996 22:41:29 +0000 (GMT) Cc: current@freebsd.org In-Reply-To: <199602292052.PAA08014@startide.ctr.columbia.edu> from Bill Paul at "Feb 29, 96 03:52:57 pm" X-Mailer: ELM [version 2.4ME+ PL10 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org Precedence: bulk > Hmm. Odd: I can't seem to trip the bug on my development box. Even so, > you're probably right about the NULL (or in this case, uninitialized) > string. It only shows up when yp_access() denies access, or if some other error occurs before the master server name is determined. > *** 1.3 1996/02/26 02:23:39 > --- yp_server.c 1996/02/29 19:57:12 > *************** > *** 532,537 **** > --- 532,539 ---- > static ypresp_master result; > DBT key,data; > > + result.peer = ""; > + > Initializing the 'peer' member of the result to an empty string should > be enough to pacify the XDR filters. Yes, it cures the SEGV. In rpc.yppasswdd however, ypxfr_get_master() frees the string sent in response, so it would seem better to have sent a malloc'd string in the first place. -- Adam David