mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
ssh/verstring.c: fix use of '\r' and '\n'.
It's a thoroughly pedantic point, but I just spotted that the comparison of wire data against theoretically platform-dependent char escapes is a violation of \k{udp-portability}.
This commit is contained in:
parent
e6df50ea6b
commit
f9bb1f4997
@ -309,8 +309,8 @@ void ssh_verstring_handle_input(BinaryPacketProtocol *bpp)
|
|||||||
* a NUL terminator.
|
* a NUL terminator.
|
||||||
*/
|
*/
|
||||||
while (s->vstring->len > 0 &&
|
while (s->vstring->len > 0 &&
|
||||||
(s->vstring->s[s->vstring->len-1] == '\r' ||
|
(s->vstring->s[s->vstring->len-1] == '\015' ||
|
||||||
s->vstring->s[s->vstring->len-1] == '\n'))
|
s->vstring->s[s->vstring->len-1] == '\012'))
|
||||||
strbuf_shrink_by(s->vstring, 1);
|
strbuf_shrink_by(s->vstring, 1);
|
||||||
|
|
||||||
bpp_logevent("Remote version: %s", s->vstring->s);
|
bpp_logevent("Remote version: %s", s->vstring->s);
|
||||||
|
Loading…
Reference in New Issue
Block a user