summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-10-15 23:51:40 +0000
committerDamien Miller <djm@mindrot.org>2015-10-16 10:54:08 +1100
commitb1d38a3cc6fe349feb8d16a5f520ef12d1de7cb2 (patch)
treea582897745d044077ea475859be73d0f5ab2158b
parent1a2663a15d356bb188196b6414b4c50dc12fd42b (diff)
upstream commit
fix some signed/unsigned integer type mismatches in format strings; reported by Nicholas Lemonias Upstream-ID: 78cd55420a0eef68c4095bdfddd1af84afe5f95c
-rw-r--r--channels.c4
-rw-r--r--mux.c6
-rw-r--r--ssh-add.c4
-rw-r--r--ssh.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/channels.c b/channels.c
index a84b487e5..fdd89a5a0 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.348 2015/10/15 23:51:40 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -662,7 +662,7 @@ channel_open_message(void)
662 case SSH_CHANNEL_INPUT_DRAINING: 662 case SSH_CHANNEL_INPUT_DRAINING:
663 case SSH_CHANNEL_OUTPUT_DRAINING: 663 case SSH_CHANNEL_OUTPUT_DRAINING:
664 snprintf(buf, sizeof buf, 664 snprintf(buf, sizeof buf,
665 " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d cc %d)\r\n", 665 " #%d %.300s (t%d r%d i%u/%d o%u/%d fd %d/%d cc %d)\r\n",
666 c->self, c->remote_name, 666 c->self, c->remote_name,
667 c->type, c->remote_id, 667 c->type, c->remote_id,
668 c->istate, buffer_len(&c->input), 668 c->istate, buffer_len(&c->input),
diff --git a/mux.c b/mux.c
index e6136fd28..d8e416262 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.55 2015/10/15 23:51:40 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -1744,7 +1744,7 @@ mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd)
1744 fwd->connect_host ? fwd->connect_host : "", 1744 fwd->connect_host ? fwd->connect_host : "",
1745 fwd->connect_port); 1745 fwd->connect_port);
1746 if (muxclient_command == SSHMUX_COMMAND_FORWARD) 1746 if (muxclient_command == SSHMUX_COMMAND_FORWARD)
1747 fprintf(stdout, "%u\n", fwd->allocated_port); 1747 fprintf(stdout, "%i\n", fwd->allocated_port);
1748 break; 1748 break;
1749 case MUX_S_PERMISSION_DENIED: 1749 case MUX_S_PERMISSION_DENIED:
1750 e = buffer_get_string(&m, NULL); 1750 e = buffer_get_string(&m, NULL);
@@ -2169,7 +2169,7 @@ muxclient(const char *path)
2169 case SSHMUX_COMMAND_ALIVE_CHECK: 2169 case SSHMUX_COMMAND_ALIVE_CHECK:
2170 if ((pid = mux_client_request_alive(sock)) == 0) 2170 if ((pid = mux_client_request_alive(sock)) == 0)
2171 fatal("%s: master alive check failed", __func__); 2171 fatal("%s: master alive check failed", __func__);
2172 fprintf(stderr, "Master running (pid=%d)\r\n", pid); 2172 fprintf(stderr, "Master running (pid=%u)\r\n", pid);
2173 exit(0); 2173 exit(0);
2174 case SSHMUX_COMMAND_TERMINATE: 2174 case SSHMUX_COMMAND_TERMINATE:
2175 mux_client_request_terminate(sock); 2175 mux_client_request_terminate(sock);
diff --git a/ssh-add.c b/ssh-add.c
index d8d6481f2..cd13d87e5 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.125 2015/09/13 14:39:16 tim Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.126 2015/10/15 23:51:40 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -384,7 +384,7 @@ list_identities(int agent_fd, int do_fp)
384 if (do_fp) { 384 if (do_fp) {
385 fp = sshkey_fingerprint(idlist->keys[i], 385 fp = sshkey_fingerprint(idlist->keys[i],
386 fingerprint_hash, SSH_FP_DEFAULT); 386 fingerprint_hash, SSH_FP_DEFAULT);
387 printf("%d %s %s (%s)\n", 387 printf("%u %s %s (%s)\n",
388 sshkey_size(idlist->keys[i]), 388 sshkey_size(idlist->keys[i]),
389 fp == NULL ? "(null)" : fp, 389 fp == NULL ? "(null)" : fp,
390 idlist->comments[i], 390 idlist->comments[i],
diff --git a/ssh.c b/ssh.c
index a6e4de3ea..43ed45557 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.426 2015/09/24 06:15:11 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.427 2015/10/15 23:51:40 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -250,7 +250,7 @@ resolve_host(const char *name, int port, int logerr, char *cname, size_t clen)
250 if (port <= 0) 250 if (port <= 0)
251 port = default_ssh_port(); 251 port = default_ssh_port();
252 252
253 snprintf(strport, sizeof strport, "%u", port); 253 snprintf(strport, sizeof strport, "%d", port);
254 memset(&hints, 0, sizeof(hints)); 254 memset(&hints, 0, sizeof(hints));
255 hints.ai_family = options.address_family == -1 ? 255 hints.ai_family = options.address_family == -1 ?
256 AF_UNSPEC : options.address_family; 256 AF_UNSPEC : options.address_family;