diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 7 |
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); |