summaryrefslogtreecommitdiff
path: root/cli-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-06-26 21:07:34 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-06-26 21:07:34 +0800
commit71b4ec569cb33a5dcd4abf50650ccd78e6d3b2dd (patch)
tree497adde943fd41206f8d263131b255dda1833ca1 /cli-runopts.c
parent3187f27fcd533b8d16feebba9090007c82725eff (diff)
parenteaf9be05d7d9de22f2ff936882874331fc2d1a0e (diff)
downloaddropbear-71b4ec569cb33a5dcd4abf50650ccd78e6d3b2dd.tar.gz
merge coverity from maincoverity
Diffstat (limited to 'cli-runopts.c')
-rw-r--r--cli-runopts.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli-runopts.c b/cli-runopts.c
index a483345..3654b9a 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -214,7 +214,7 @@ void cli_getopts(int argc, char ** argv) {
cli_opts.always_accept_key = 1;
break;
case 'p': /* remoteport */
- next = &cli_opts.remoteport;
+ next = (char**)&cli_opts.remoteport;
break;
#if DROPBEAR_CLI_PUBKEY_AUTH
case 'i': /* an identityfile */
@@ -378,6 +378,11 @@ void cli_getopts(int argc, char ** argv) {
}
}
+#if DROPBEAR_USER_ALGO_LIST
+ /* -c help doesn't need a hostname */
+ parse_ciphers_macs();
+#endif
+
/* Done with options/flags; now handle the hostname (which may not
* start with a hyphen) and optional command */
@@ -408,10 +413,6 @@ void cli_getopts(int argc, char ** argv) {
/* And now a few sanity checks and setup */
-#if DROPBEAR_USER_ALGO_LIST
- parse_ciphers_macs();
-#endif
-
#if DROPBEAR_CLI_PROXYCMD
if (cli_opts.proxycmd) {
/* To match the common path of m_freeing it */