DELBERGUE Guillaume
Committed by KONRAD Frederic
Builds for 1 pipeline passed

Fix telnet character mode buffer overflow

Fix seg fault error due to bad buffer size.

Signed-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>
... ... @@ -140,11 +140,15 @@ void TCPSerial::socket_thread()
write(connfd, IAC, 1);
write(connfd, WILL, 1);
write(connfd, SGA, 1);
recv(connfd, &data, 3, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
write(connfd, IAC, 1);
write(connfd, WILL, 1);
write(connfd, ECHO, 1);
recv(connfd, &data, 3, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
recv(connfd, &data, 1, MSG_WAITALL);
write(connfd, CLR_SCR, 7);
}
... ...