From 1aed76feede0c05cbd2a9b2bc8ef4e1625f0568b Mon Sep 17 00:00:00 2001 From: Chris Luke Date: Fri, 29 Apr 2016 08:14:38 -0400 Subject: VPP-27 Extend telnet protocol buffer guard With Telnet protocol overhead, the string "xterm-256color", which is the norm when the terminal is iTerm on a Mac, is longer than the 16 byte lookahead overflow guard in the Telnet protocol processor. This extends it to 24 bytes. This guard is designed to encourage the protocol processor to quit waiting for bytes indefinitely if those already in the buffer do not form a complete message. Whilst this is unlikely, extending the guard length would mean more bytes need to be received before it gives up. Change-Id: Ibaa3d35b78bfd298fe0e4f4c6e508440f122e916 Signed-off-by: Chris Luke --- vlib/vlib/unix/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/vlib/unix/cli.c b/vlib/vlib/unix/cli.c index 91dfd117caa..7fb20560d77 100644 --- a/vlib/vlib/unix/cli.c +++ b/vlib/vlib/unix/cli.c @@ -71,7 +71,7 @@ /** Maximum depth into a byte stream from which to compile a Telnet * protocol message. This is a saftey measure. */ -#define UNIX_CLI_MAX_DEPTH_TELNET 16 +#define UNIX_CLI_MAX_DEPTH_TELNET 24 /** Unix standard in */ #define UNIX_CLI_STDIN_FD 0 -- cgit 1.2.3-korg