[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for long
From: |
Joerg Mayer |
Subject: |
Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names |
Date: |
Mon, 7 Feb 2022 12:00:26 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Feb 05, 2022 at 05:18:01PM +0100, Erik Auerswald wrote:
[ots of interesting stuff deleted]
I agree with Erik's analysis and conclusions. As any "relevant" telnet
implementation
should also implement the NEWENV option there should not even be a loss of
functionality
by staying with the original buffer size.
> diff -Naur inetutils-2.2.orig/telnet/telnet.c
> inetutils-2.2.changed/telnet/telnet.c
> --- inetutils-2.2.orig/telnet/telnet.c 2021-05-25 17:54:19.000000000
> +0200
> +++ inetutils-2.2.changed/telnet/telnet.c 2022-02-05 16:31:43.474464119
> +0100
> @@ -1011,11 +1011,13 @@
> /* Remote host, and display server must not be corrupted
> * by truncation. In addition, every character of telnet
> * protocol must remain unsevered. Check that DP fits in
> - * full within TEMP. Otherwise report buffer error.
> + * full within TEMP. Otherwise report buffer error and
> + * turn off the option.
> */
> if (strlen ((char *) dp) >= sizeof (temp) - 4 - 2)
> {
> - printf ("lm_will: not enough room in buffer\n");
> + printf ("lm_will: not enough room in buffer for DISPLAY\n");
> + send_wont (TELOPT_XDISPLOC, 1);
> break;
> }
>
I prefer Erik's patch over mine.
Kind regards
Jörg
--
Joerg Mayer <jmayer@loplof.de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/01
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/05
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/07
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names,
Joerg Mayer <=
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/18
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Alfred M. Szmidt, 2022/02/19
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/20
- Re: Bug in telnet from inetutils-2.2: Insufficient buffer space for longish DISPLAY names, Erik Auerswald, 2022/02/21
- [PATCH 0/3] GNU inetutils telnet client fixes, Erik Auerswald, 2022/02/27
- [PATCH 1/3] telnet: Abort subnegotiation of XDISPLOC on error., Erik Auerswald, 2022/02/27
- [PATCH 2/3] telnet: Fix TTYPE subnegotiation off-by-one error., Erik Auerswald, 2022/02/27
- [PATCH 3/3] telnet: Avoid command evaluation crashes., Erik Auerswald, 2022/02/27