curl-users
Re: bug in telnet.c?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 27 Nov 2001 14:52:23 +0100 (MET)
Received on 2001-11-27
Date: Tue, 27 Nov 2001 14:52:23 +0100 (MET)
On Tue, 27 Nov 2001, Hans Steegers wrote:
Thanks for your report!
> In lib/telnet.c is says "read from stdin", but the read is
> read(1,buf,255); which is stdout!
Now isn't that silly? ;-) The weird thing is that it has worked...
> Is this intended, to use stdout for reading?
No, it is not intended.
> Or is it a bug? If so:
You should also change the FD_SET() line before the while() loop and the
FD_ISSET() call that checks if there's data available from stdin.
See my suggested attached patch.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
- TEXT/PLAIN attachment: 7.9.1-telnet.patch