summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2016-11-18 23:56:22 +0800
committerGitHub <noreply@github.com>2016-11-18 23:56:22 +0800
commit9f674382d55cb3b8effcb53cf8d7c2d368675f3d (patch)
tree69682ee5349807e7a9f9a5276b85e4dc76586548
parent6830a65923efc536a19c36cd1c362120b9d0d929 (diff)
parent0d9c3fe70b828ff4af3a7b9fa20a169afa1a1fae (diff)
Merge pull request #27 from fperrad/20160325_lint
more linting
-rw-r--r--cli-tcpfwd.c4
-rw-r--r--common-channel.c1
-rw-r--r--svr-chansession.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index 95b2d7c..78f61f7 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -234,7 +234,7 @@ static int newtcpforwarded(struct Channel * channel) {
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 @@ static int newtcpforwarded(struct Channel * channel) {
}
- 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 --git a/common-channel.c b/common-channel.c
index 835e493..7383f47 100644
--- a/common-channel.c
+++ b/common-channel.c
@@ -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 --git a/svr-chansession.c b/svr-chansession.c
index 6dbc8ad..22fc954 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -634,7 +634,7 @@ static void make_connection_string(struct ChanSess *chansess) {
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"))