*BSD News Article 35308


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!usc!nic-nac.CSU.net!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!jmonroy
From: jmonroy@netcom.com (Jesus Monroy Jr)
Subject: Re: Widespread bug in rpc-lib
Message-ID: <jmonroyCvGrvs.GMF@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <3407du$ihe@nz12.rz.uni-karlsruhe.de> <1994Aug31.180556.16857@cs.ucla.edu>
Date: Thu, 1 Sep 1994 18:40:39 GMT
Lines: 34

Geoff Kuenning (geoff@ficus.cs.ucla.edu) wrote:
: In article <3407du$ihe@nz12.rz.uni-karlsruhe.de>
: Thomas.Koenig@ciw.uni-karlsruhe.de writes:

: >         if (rlen == -1 && errno == EINTR)
: >                 goto again;
: >         if (rlen < 4*sizeof(u_long))
: >                 return (FALSE);
: > 
: > The fix is easy; just change the appropriate line to
: > 
: > 	if (rlen < (int) (4*sizeof(u_long)))

: Except this is the wrong fix!  The correct fix is to change the code
: as follows:

: 	if (rlen < 0) {
: 		if (errno == EINTR)
: 			goto again;
: 		else
: 			return (FALSE);
: 	}
: 	else if (rlen < 4*sizeof(u_long))
: 		return (FALSE);
:
	since When is a "goto" a fix?

	Sound like another bug to me.

-- 
Jesus Monroy Jr                                          jmonroy@netcom.com
Zebra Research
/386BSD/device-drivers /fd /qic /clock /documentation
___________________________________________________________________________