changeset 1328:c13aa2cd8d51

Merge pull request #27 from fperrad/20160325_lint more linting
author Matt Johnston <matt@ucc.asn.au>
date Fri, 18 Nov 2016 23:56:22 +0800
parents 871698dd3669 (current diff) e47e4b8a005d (diff)
children 185c14fa504d 8747c2b19152
files
diffstat 3 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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\"", 
--- 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"
--- 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"))