Mercurial > dropbear
comparison svr-tcpfwd.c @ 1129:45830474d83c coverity
merge up to date, attempt to fix travis.yml
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 12 Jun 2015 23:02:15 +0800 |
parents | aaf576b27a10 |
children | 888e3d17e962 2bb4c662d1c2 |
comparison
equal
deleted
inserted
replaced
1077:26c1f9b8f82e | 1129:45830474d83c |
---|---|
63 /* At the moment this is completely used for tcp code (with the name reflecting | 63 /* At the moment this is completely used for tcp code (with the name reflecting |
64 * that). If new request types are added, this should be replaced with code | 64 * that). If new request types are added, this should be replaced with code |
65 * similar to the request-switching in chansession.c */ | 65 * similar to the request-switching in chansession.c */ |
66 void recv_msg_global_request_remotetcp() { | 66 void recv_msg_global_request_remotetcp() { |
67 | 67 |
68 unsigned char* reqname = NULL; | 68 char* reqname = NULL; |
69 unsigned int namelen; | 69 unsigned int namelen; |
70 unsigned int wantreply = 0; | 70 unsigned int wantreply = 0; |
71 int ret = DROPBEAR_FAILURE; | 71 int ret = DROPBEAR_FAILURE; |
72 | 72 |
73 TRACE(("enter recv_msg_global_request_remotetcp")) | 73 TRACE(("enter recv_msg_global_request_remotetcp")) |
118 } | 118 } |
119 | 119 |
120 static int svr_cancelremotetcp() { | 120 static int svr_cancelremotetcp() { |
121 | 121 |
122 int ret = DROPBEAR_FAILURE; | 122 int ret = DROPBEAR_FAILURE; |
123 unsigned char * bindaddr = NULL; | 123 char * bindaddr = NULL; |
124 unsigned int addrlen; | 124 unsigned int addrlen; |
125 unsigned int port; | 125 unsigned int port; |
126 struct Listener * listener = NULL; | 126 struct Listener * listener = NULL; |
127 struct TCPListener tcpinfo; | 127 struct TCPListener tcpinfo; |
128 | 128 |
153 } | 153 } |
154 | 154 |
155 static int svr_remotetcpreq() { | 155 static int svr_remotetcpreq() { |
156 | 156 |
157 int ret = DROPBEAR_FAILURE; | 157 int ret = DROPBEAR_FAILURE; |
158 unsigned char * request_addr = NULL; | 158 char * request_addr = NULL; |
159 unsigned int addrlen; | 159 unsigned int addrlen; |
160 struct TCPListener *tcpinfo = NULL; | 160 struct TCPListener *tcpinfo = NULL; |
161 unsigned int port; | 161 unsigned int port; |
162 | 162 |
163 TRACE(("enter remotetcpreq")) | 163 TRACE(("enter remotetcpreq")) |
230 | 230 |
231 /* Called upon creating a new direct tcp channel (ie we connect out to an | 231 /* Called upon creating a new direct tcp channel (ie we connect out to an |
232 * address */ | 232 * address */ |
233 static int newtcpdirect(struct Channel * channel) { | 233 static int newtcpdirect(struct Channel * channel) { |
234 | 234 |
235 unsigned char* desthost = NULL; | 235 char* desthost = NULL; |
236 unsigned int destport; | 236 unsigned int destport; |
237 unsigned char* orighost = NULL; | 237 char* orighost = NULL; |
238 unsigned int origport; | 238 unsigned int origport; |
239 char portstring[NI_MAXSERV]; | 239 char portstring[NI_MAXSERV]; |
240 int len; | 240 unsigned int len; |
241 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; | 241 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; |
242 | 242 |
243 TRACE(("newtcpdirect channel %d", channel->index)) | 243 TRACE(("newtcpdirect channel %d", channel->index)) |
244 | 244 |
245 if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) { | 245 if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) { |