# HG changeset patch # User Matt Johnston # Date 1479484582 -28800 # Node ID c13aa2cd8d51e3a9f089c1eebb04c21a5efa3acd # Parent 871698dd36697065429521aec2fe98403b4055f7# Parent e47e4b8a005dd92d6e30c9cc4153ef44a42d6133 Merge pull request #27 from fperrad/20160325_lint more linting diff -r 871698dd3669 -r c13aa2cd8d51 cli-tcpfwd.c --- a/cli-tcpfwd.c Fri Nov 18 22:48:50 2016 +0800 +++ b/cli-tcpfwd.c Fri Nov 18 23:56:22 2016 +0800 @@ -234,7 +234,7 @@ char *origaddr = NULL; unsigned int origport; m_list_elem * iter = NULL; - struct TCPFwdEntry *fwd; + struct TCPFwdEntry *fwd = NULL; char portstring[NI_MAXSERV]; int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; @@ -265,7 +265,7 @@ } - if (iter == NULL) { + if (iter == NULL || fwd == NULL) { /* We didn't request forwarding on that port */ cleantext(origaddr); dropbear_log(LOG_INFO, "Server sent unrequested forward from \"%s:%d\"", diff -r 871698dd3669 -r c13aa2cd8d51 common-channel.c --- a/common-channel.c Fri Nov 18 22:48:50 2016 +0800 +++ b/common-channel.c Fri Nov 18 23:56:22 2016 +0800 @@ -32,7 +32,6 @@ #include "circbuffer.h" #include "dbutil.h" #include "channel.h" -#include "ssh.h" #include "listener.h" #include "runopts.h" #include "netio.h" diff -r 871698dd3669 -r c13aa2cd8d51 svr-chansession.c --- a/svr-chansession.c Fri Nov 18 22:48:50 2016 +0800 +++ b/svr-chansession.c Fri Nov 18 23:56:22 2016 +0800 @@ -634,7 +634,7 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, int iscmd, int issubsys) { - unsigned int cmdlen; + unsigned int cmdlen = 0; int ret; TRACE(("enter sessioncommand"))