diff --git a/logging.c b/logging.c index e324c77c..d61038c9 100644 --- a/logging.c +++ b/logging.c @@ -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); } diff --git a/misc.c b/misc.c index 610f0f3d..9ca15c8f 100644 --- a/misc.c +++ b/misc.c @@ -223,7 +223,7 @@ char *buildinfo(const char *newline) #else strbuf_catf(buf, ", emulating "); #endif - strbuf_catf(buf, "Visual Studio", newline); + strbuf_catf(buf, "Visual Studio"); #if 0 /* diff --git a/pscp.c b/pscp.c index 5f69e4c3..cadf7916 100644 --- a/pscp.c +++ b/pscp.c @@ -1789,7 +1789,7 @@ static void sink(const char *targ, const char *src) with_stripctrl(santarg, act.name) { tell_user(stderr, "warning: remote host sent a" " compound pathname '%s'", sanname); - tell_user(stderr, " renaming local", + tell_user(stderr, " renaming local" " file to '%s'", santarg); } } diff --git a/ssh.c b/ssh.c index 417d6c11..719d9e61 100644 --- a/ssh.c +++ b/ssh.c @@ -562,7 +562,7 @@ void ssh_deferred_abort_callback(void *vctx) Ssh *ssh = (Ssh *)vctx; char *msg = ssh->deferred_abort_message; ssh->deferred_abort_message = NULL; - ssh_sw_abort(ssh, msg); + ssh_sw_abort(ssh, "%s", msg); sfree(msg); } diff --git a/ssh2connection.c b/ssh2connection.c index 28054d43..a8c20f2d 100644 --- a/ssh2connection.c +++ b/ssh2connection.c @@ -750,7 +750,8 @@ static bool ssh2_connection_filter_queue(struct ssh2_connection_state *s) "Received %s for channel %d with no outstanding " "channel request", ssh2_pkt_type(s->ppl.bpp->pls->kctx, - s->ppl.bpp->pls->actx, pktin->type)); + s->ppl.bpp->pls->actx, pktin->type), + c->localid); return true; } ocr->handler(c, pktin, ocr->ctx); diff --git a/sshhmac.c b/sshhmac.c index 232d7680..29db9fbf 100644 --- a/sshhmac.c +++ b/sshhmac.c @@ -44,7 +44,7 @@ static ssh2_mac *hmac_new(const ssh2_macalg *alg, ssh_cipher *cipher) ctx->digest = snewn(ctx->hashalg->hlen, uint8_t); ctx->text_name = strbuf_new(); - strbuf_catf(ctx->text_name, "HMAC-%s", + strbuf_catf(ctx->text_name, "HMAC-%s%s", ctx->hashalg->text_basename, extra->suffix); if (extra->annotation || ctx->hashalg->annotation) { strbuf_catf(ctx->text_name, " ("); diff --git a/sshrsa.c b/sshrsa.c index 81522aa8..504a73e7 100644 --- a/sshrsa.c +++ b/sshrsa.c @@ -296,7 +296,7 @@ char *rsa_ssh1_fingerprint(RSAKey *key) ssh_hash_final(hash, digest); out = strbuf_new(); - strbuf_catf(out, "%d ", mp_get_nbits(key->modulus)); + strbuf_catf(out, "%zu ", mp_get_nbits(key->modulus)); for (i = 0; i < 16; i++) strbuf_catf(out, "%s%02x", i ? ":" : "", digest[i]); if (key->comment) diff --git a/sshshare.c b/sshshare.c index 98071d8e..573114cd 100644 --- a/sshshare.c +++ b/sshshare.c @@ -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; /*