[openssh-commits] [openssh] 03/03: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat Oct 1 07:08:09 AEST 2016
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 2f78a2a698f4222f8e05cad57ac6e0c3d1faff00
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Sep 30 20:24:46 2016 +0000
upstream commit
fix some -Wpointer-sign warnings in the new mux proxy; ok
markus@
Upstream-ID: b1ba7b3769fbc6b7f526792a215b0197f5e55dfd
---
channels.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/channels.c b/channels.c
index ae24841..fecd454 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.354 2016/09/30 09:19:13 markus Exp $ */
+/* $OpenBSD: channels.c,v 1.355 2016/09/30 20:24:46 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2472,7 +2472,8 @@ channel_proxy_downstream(Channel *downstream)
char *ctype = NULL, *listen_host = NULL;
u_char type;
size_t have;
- int ret = -1, r, id, remote_id, listen_port, idx;
+ int ret = -1, r, idx;
+ u_int id, remote_id, listen_port;
/* sshbuf_dump(&downstream->input, stderr); */
if ((r = sshbuf_get_string_direct(&downstream->input, &cp, &have))
@@ -2563,6 +2564,11 @@ channel_proxy_downstream(Channel *downstream)
error("%s: parse error %s", __func__, ssh_err(r));
goto out;
}
+ if (listen_port > 65535) {
+ error("%s: tcpip-forward for %s: bad port %u",
+ __func__, listen_host, listen_port);
+ goto out;
+ }
/* Record that connection to this host/port is permitted. */
permitted_opens = xreallocarray(permitted_opens,
num_permitted_opens + 1, sizeof(*permitted_opens));
@@ -2570,7 +2576,7 @@ channel_proxy_downstream(Channel *downstream)
permitted_opens[idx].host_to_connect = xstrdup("<mux>");
permitted_opens[idx].port_to_connect = -1;
permitted_opens[idx].listen_host = listen_host;
- permitted_opens[idx].listen_port = listen_port;
+ permitted_opens[idx].listen_port = (int)listen_port;
permitted_opens[idx].downstream = downstream;
listen_host = NULL;
break;
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list