Following up, I found the following solution to address the same
problem:

https://github.com/NetBSD/src/commit/36b8cfb2e28f691beae12da0c207086e1df0c8c4#diff-38b7213f9c6c21245fbeb4fad9520a27239d712a6dd0fea20dd6b77203b5737c

This solves the infloop, but it seems it is mostly masquerading the
real issue, and it has to side-effect of making Exit() and ExitString()
behave inconsistent -- and ExitString() is used on every successful
exit of telnet, so it seems this could cause data loss if there are
pending data to read in the ring buffer, and/or flush data in the
buffert to standard output.

I'm inclined to use the NetBSD solution in GNU InetUtils, in particular
if you decide to do the same in OpenBSD telnet too.  If someone wants
to wrap their head around the code and clean things up properly, I'm
all for it, but I prefer to not be the one to blame for future bugs.

/Simon

Attachment: signature.asc
Description: This is a digitally signed message part

  • telnet crash Simon Josefsson
    • Re: telnet crash Simon Josefsson

Reply via email to