Fixing crash on -J (proxycmd)

Lluís Batlle i Rossell viric at viric.name
Tue Jun 18 03:51:45 WST 2013


Oops, now the patch with tabs.

Regards,
Lluís.

On Mon, Jun 17, 2013 at 09:21:54PM +0200, Lluís Batlle i Rossell wrote:
> Hello,
> 
> since 0.53 (at least), using -J crashes on mips. With valgrind, I tracked this
> down to a bad free.
> 
> Here is the patch attached that should fix it. At least, valgrind doesn't
> complain. I'll test it with mips later.
> 
> Regards,
> Lluís.
-------------- next part --------------
diff -r 5ba19d00da08 cli-runopts.c
--- a/cli-runopts.c	Sun May 26 18:43:00 2013 +0800
+++ b/cli-runopts.c	Mon Jun 17 19:51:08 2013 +0000
@@ -383,6 +383,13 @@
 		exit(EXIT_FAILURE);
 	}
 
+#ifdef ENABLE_CLI_PROXYCMD
+	if (cli_opts.proxycmd) {
+		/* To match the common path of m_freeing it */
+		cli_opts.proxycmd = m_strdup(cli_opts.proxycmd);
+	}
+#endif
+
 	if (cli_opts.remoteport == NULL) {
 		cli_opts.remoteport = "22";
 	}


More information about the Dropbear mailing list