Mercurial > dropbear
diff cli-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 | d49bda490798 |
line wrap: on
line diff
--- a/cli-tcpfwd.c Tue Dec 15 22:24:34 2015 +0800 +++ b/cli-tcpfwd.c Tue Mar 15 22:45:43 2016 +0800 @@ -231,7 +231,7 @@ static int newtcpforwarded(struct Channel * channel) { - char *origaddr = NULL; + char *origaddr = NULL; unsigned int origport; m_list_elem * iter = NULL; struct TCPFwdEntry *fwd; @@ -267,13 +267,13 @@ if (iter == NULL) { /* We didn't request forwarding on that port */ - cleantext(origaddr); + cleantext(origaddr); dropbear_log(LOG_INFO, "Server sent unrequested forward from \"%s:%d\"", origaddr, origport); goto out; } - snprintf(portstring, sizeof(portstring), "%d", fwd->connectport); + snprintf(portstring, sizeof(portstring), "%u", fwd->connectport); channel->conn_pending = connect_remote(fwd->connectaddr, portstring, channel_connect_done, channel); channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;