1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Fix format string mistakes revealed by new checking.

An assortment of errors: int vs size_t confusion (probably undetected
since the big switchover in commit 0cda34c6f), some outright spurious
parameters after the format string (copy-paste errors), a particularly
silly one in pscp.c (a comma between two halves of what should have
been a single string literal), and a _missing_ format string in ssh.c
(but luckily in a context where the only text that would be wrongly
treated as a format string was error messages generated elsewhere in
PuTTY).
This commit is contained in:
Simon Tatham
2020-01-26 15:00:13 +00:00
parent cbfba7a0e9
commit 247866a9d3
8 changed files with 11 additions and 9 deletions

View File

@ -1794,8 +1794,9 @@ static void share_receive(Plug *plug, int urgent, const char *data, size_t len)
}
if (cs->recvlen > 0 && cs->recvbuf[cs->recvlen-1] == '\015')
cs->recvlen--; /* trim off \r before \n */
ptrlen verstring = make_ptrlen(cs->recvbuf, cs->recvlen);
log_downstream(cs, "Downstream version string: %.*s",
cs->recvlen, cs->recvbuf);
PTRLEN_PRINTF(verstring));
cs->got_verstring = true;
/*