comparison svr-tcpfwd.c @ 1256:506f7681d0f8 coverity

merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 22:45:43 +0800
parents 52a456a3add0
children 9169e4e7cbee
comparison
equal deleted inserted replaced
1219:84cf9062718d 1256:506f7681d0f8
192 tcpinfo->chantype = &svr_chan_tcpremote; 192 tcpinfo->chantype = &svr_chan_tcpremote;
193 tcpinfo->tcp_type = forwarded; 193 tcpinfo->tcp_type = forwarded;
194 194
195 tcpinfo->request_listenaddr = request_addr; 195 tcpinfo->request_listenaddr = request_addr;
196 if (!opts.listen_fwd_all || (strcmp(request_addr, "localhost") == 0) ) { 196 if (!opts.listen_fwd_all || (strcmp(request_addr, "localhost") == 0) ) {
197 /* NULL means "localhost only" */ 197 /* NULL means "localhost only" */
198 tcpinfo->listenaddr = NULL; 198 tcpinfo->listenaddr = NULL;
199 } 199 }
200 else 200 else
201 { 201 {
202 tcpinfo->listenaddr = request_addr; 202 tcpinfo->listenaddr = request_addr;
267 if (origport > 65535 || destport > 65535) { 267 if (origport > 65535 || destport > 65535) {
268 TRACE(("leave newtcpdirect: port > 65535")) 268 TRACE(("leave newtcpdirect: port > 65535"))
269 goto out; 269 goto out;
270 } 270 }
271 271
272 snprintf(portstring, sizeof(portstring), "%d", destport); 272 snprintf(portstring, sizeof(portstring), "%u", destport);
273 channel->conn_pending = connect_remote(desthost, portstring, channel_connect_done, channel); 273 channel->conn_pending = connect_remote(desthost, portstring, channel_connect_done, channel);
274 274
275 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE; 275 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
276 276
277 err = SSH_OPEN_IN_PROGRESS; 277 err = SSH_OPEN_IN_PROGRESS;