summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-07-18 16:12:44 +1000
committerDamien Miller <djm@mindrot.org>2013-07-18 16:12:44 +1000
commitce98654674648fb7d58f73edf6aa398656a2dba4 (patch)
tree0eaf824f5ec795de2204e800d6e1d74d2c905ac8 /channels.c
parent0d02c3e10e1ed16d6396748375a133d348127a2a (diff)
- djm@cvs.openbsd.org 2013/07/12 00:19:59
[auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c] [hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c] fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index b48e6aebb..9e87bfb9e 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.323 2013/06/07 15:37:52 dtucker Exp $ */ 1/* $OpenBSD: channels.c,v 1.324 2013/07/12 00:19:58 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
@@ -1139,7 +1139,8 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1139 u_int8_t atyp; 1139 u_int8_t atyp;
1140 } s5_req, s5_rsp; 1140 } s5_req, s5_rsp;
1141 u_int16_t dest_port; 1141 u_int16_t dest_port;
1142 u_char *p, dest_addr[255+1], ntop[INET6_ADDRSTRLEN]; 1142 char dest_addr[255+1], ntop[INET6_ADDRSTRLEN];
1143 u_char *p;
1143 u_int have, need, i, found, nmethods, addrlen, af; 1144 u_int have, need, i, found, nmethods, addrlen, af;
1144 1145
1145 debug2("channel %d: decode socks5", c->self); 1146 debug2("channel %d: decode socks5", c->self);
@@ -1209,7 +1210,7 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1209 buffer_consume(&c->input, sizeof(s5_req)); 1210 buffer_consume(&c->input, sizeof(s5_req));
1210 if (s5_req.atyp == SSH_SOCKS5_DOMAIN) 1211 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
1211 buffer_consume(&c->input, 1); /* host string length */ 1212 buffer_consume(&c->input, 1); /* host string length */
1212 buffer_get(&c->input, (char *)&dest_addr, addrlen); 1213 buffer_get(&c->input, &dest_addr, addrlen);
1213 buffer_get(&c->input, (char *)&dest_port, 2); 1214 buffer_get(&c->input, (char *)&dest_port, 2);
1214 dest_addr[addrlen] = '\0'; 1215 dest_addr[addrlen] = '\0';
1215 free(c->path); 1216 free(c->path);