mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 19:41:01 -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:
@ -344,7 +344,7 @@ void log_packet(LogContext *ctx, int direction, int type,
|
||||
/* If we're about to stop omitting, it's time to say how
|
||||
* much we omitted. */
|
||||
if ((blktype != PKTLOG_OMIT) && omitted) {
|
||||
logprintf(ctx, " (%d byte%s omitted)\r\n",
|
||||
logprintf(ctx, " (%zu byte%s omitted)\r\n",
|
||||
omitted, (omitted==1?"":"s"));
|
||||
omitted = 0;
|
||||
}
|
||||
@ -387,7 +387,7 @@ void log_packet(LogContext *ctx, int direction, int type,
|
||||
|
||||
/* Tidy up */
|
||||
if (omitted)
|
||||
logprintf(ctx, " (%d byte%s omitted)\r\n",
|
||||
logprintf(ctx, " (%zu byte%s omitted)\r\n",
|
||||
omitted, (omitted==1?"":"s"));
|
||||
logflush(ctx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user