bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: telnet segfaults on Hurd


From: Marcus Brinkmann
Subject: Re: telnet segfaults on Hurd
Date: Fri, 17 Aug 2001 17:37:39 +0200
User-agent: Mutt/1.3.20i

On Fri, Aug 17, 2001 at 11:08:49AM -0400, Alain Magloire wrote:
> > TIOCFLUSH expects an (int *) as third argument.  The Hurd always requires
> > the arguments, as they are pasted to and from a server RPC.
> 
> It seems to me, that the Hurd should do a quick sanity check for
> the null argument.

This is not obvious to me.  What should the C library do?  Return an error?
Initialize the RPC arguments with 0?  Leave them at random values?  I think
segfaulting is an appropriate response to this bug.

> > Can't we better use tcdrain(fileno(stdout)) here anyway?
> 
> Not exactly, you probably mean: tcflush () not tcdrain ().

Ah, ok.  Thanks.

> This is the good way but the long way to go, since tcflush()
> needs to be check(configure.in) with a proper replacement in ineutils/lib.
> Telnet client/server is litter with such code.  And frankly at this time I
> lack the courage to clean this out.

Yeah, I understand.

> A simple fix is
> Give it a try.

That was the very first thing I tried, and it worked, so I checked it in.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org address@hidden
Marcus Brinkmann              GNU    http://www.gnu.org    address@hidden
address@hidden
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]