diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-07-08 22:42:32 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-07-08 22:42:32 +0800 |
commit | 0b25593df1724546b1cc9e935e05bcbbc84b13cb (patch) | |
tree | 3d0f2d3502d7b9b618ce1e446ffed57886a4af25 /cli-runopts.c | |
parent | 8cc220c0965b288be64b8f8451e73afd9bd87fda (diff) | |
download | dropbear-0b25593df1724546b1cc9e935e05bcbbc84b13cb.tar.gz |
strdup the proxycmd to avoid crash when freeing, from Llu?s Batlle i Rossell
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 91a2f42..b8d304f 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -383,6 +383,13 @@ void cli_getopts(int argc, char ** argv) { 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"; } |