mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Avoid the ldisc passing zero-length strings to back->send(). VMS
sshd has interesting behaviour on receiving a zero-length SSH data packet. [originally from svn r508]
This commit is contained in:
parent
eb79da11de
commit
c9e236eb39
2
ldisc.c
2
ldisc.c
@ -123,6 +123,7 @@ static void term_send(char *buf, int len) {
|
||||
}
|
||||
break;
|
||||
case CTRL('M'): /* send with newline */
|
||||
if (term_buflen > 0)
|
||||
back->send(term_buf, term_buflen);
|
||||
if (cfg.protocol == PROT_RAW)
|
||||
back->send("\r\n", 2);
|
||||
@ -153,6 +154,7 @@ static void simple_send(char *buf, int len) {
|
||||
term_buflen--;
|
||||
}
|
||||
}
|
||||
if (len > 0)
|
||||
back->send(buf, len);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user