1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Another valgrind-caught error. This one has apparently been there

since the Dawn O' Time, and consisted of me putting the two halves
of a short-circuiting bounds check the wrong way round: instead of
`p_in_range && *p', I had `*p && p_in_range'. Oops. valgrind rocks.

[originally from svn r2174]
This commit is contained in:
Simon Tatham 2002-11-01 13:01:14 +00:00
parent 63f793b965
commit 6c09add500

View File

@ -742,7 +742,7 @@ static int telnet_send(void *handle, char *buf, int len)
while (p < buf + len) {
char *q = p;
while (iswritable((unsigned char) *p) && p < buf + len)
while (p < buf + len && iswritable((unsigned char) *p))
p++;
telnet->bufsize = sk_write(telnet->s, q, p - q);