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; }