--- telnet.c.orig 2022-01-31 15:42:20.000000000 +0100 +++ telnet.c 2022-01-31 15:56:07.000000000 +0100 @@ -995,7 +995,7 @@ return; if (SB_GET () == TELQUAL_SEND) { - unsigned char temp[50], *dp; + unsigned char temp[1024], *dp; int len; if ((dp = env_getvalue ("DISPLAY")) == NULL) @@ -1016,6 +1016,7 @@ if (strlen ((char *) dp) >= sizeof (temp) - 4 - 2) { printf ("lm_will: not enough room in buffer\n"); + send_wont (TELOPT_XDISPLOC, 1); break; }