diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/channels.c b/channels.c index d67fdf48b..9dcd81286 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.336 2014/07/15 15:54:14 millert Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.337 2014/10/08 22:15:06 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 |
@@ -669,7 +669,7 @@ channel_open_message(void) | |||
669 | } | 669 | } |
670 | } | 670 | } |
671 | buffer_append(&buffer, "\0", 1); | 671 | buffer_append(&buffer, "\0", 1); |
672 | cp = xstrdup(buffer_ptr(&buffer)); | 672 | cp = xstrdup((char *)buffer_ptr(&buffer)); |
673 | buffer_free(&buffer); | 673 | buffer_free(&buffer); |
674 | return cp; | 674 | return cp; |
675 | } | 675 | } |
@@ -1055,7 +1055,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) | |||
1055 | len = sizeof(s4_req); | 1055 | len = sizeof(s4_req); |
1056 | if (have < len) | 1056 | if (have < len) |
1057 | return 0; | 1057 | return 0; |
1058 | p = buffer_ptr(&c->input); | 1058 | p = (char *)buffer_ptr(&c->input); |
1059 | 1059 | ||
1060 | need = 1; | 1060 | need = 1; |
1061 | /* SOCKS4A uses an invalid IP address 0.0.0.x */ | 1061 | /* SOCKS4A uses an invalid IP address 0.0.0.x */ |
@@ -1085,7 +1085,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) | |||
1085 | buffer_get(&c->input, (char *)&s4_req.dest_port, 2); | 1085 | buffer_get(&c->input, (char *)&s4_req.dest_port, 2); |
1086 | buffer_get(&c->input, (char *)&s4_req.dest_addr, 4); | 1086 | buffer_get(&c->input, (char *)&s4_req.dest_addr, 4); |
1087 | have = buffer_len(&c->input); | 1087 | have = buffer_len(&c->input); |
1088 | p = buffer_ptr(&c->input); | 1088 | p = (char *)buffer_ptr(&c->input); |
1089 | if (memchr(p, '\0', have) == NULL) | 1089 | if (memchr(p, '\0', have) == NULL) |
1090 | fatal("channel %d: decode socks4: user not nul terminated", | 1090 | fatal("channel %d: decode socks4: user not nul terminated", |
1091 | c->self); | 1091 | c->self); |
@@ -1105,7 +1105,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) | |||
1105 | c->path = xstrdup(host); | 1105 | c->path = xstrdup(host); |
1106 | } else { /* SOCKS4A: two strings */ | 1106 | } else { /* SOCKS4A: two strings */ |
1107 | have = buffer_len(&c->input); | 1107 | have = buffer_len(&c->input); |
1108 | p = buffer_ptr(&c->input); | 1108 | p = (char *)buffer_ptr(&c->input); |
1109 | len = strlen(p); | 1109 | len = strlen(p); |
1110 | debug2("channel %d: decode socks4a: host %s/%d", | 1110 | debug2("channel %d: decode socks4a: host %s/%d", |
1111 | c->self, p, len); | 1111 | c->self, p, len); |