Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!ucla-cs!geoff From: geoff@ficus.cs.ucla.edu (Geoff Kuenning) Subject: Re: Widespread bug in rpc-lib Message-ID: <1994Aug31.180556.16857@cs.ucla.edu> Sender: usenet@cs.ucla.edu (Mr Usenet) Nntp-Posting-Host: exeter.cs.ucla.edu Organization: UCLA, Computer Science Department References: <3407du$ihe@nz12.rz.uni-karlsruhe.de> Date: Wed, 31 Aug 94 18:05:56 GMT Lines: 25 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); -- Geoff Kuenning geoff@ficus.cs.ucla.edu geoff@ITcorp.com