diff --git a/mux.c b/mux.c index 1cfb914..c8812a7 100644 --- a/mux.c +++ b/mux.c @@ -306,7 +306,7 @@ static int handle_receive_buf(struct ios_ops *ios, unsigned char *buf, int len) unsigned char *sendbuf = buf; int i; - while (len) { + while (len > 0) { switch (*buf) { case IAC: /* BUG: this is telnet specific */