diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-11-23 14:08:50 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-11-23 17:31:26 +0100 |
commit | a106a00e0dde9abd295dc921306b8de63025571f (patch) | |
tree | 1417c19aca21e60b66f3d595e6f054be9fb63683 | |
parent | d8372c3063eb8037a0447ea557e457142a0ee65a (diff) | |
download | libssh-a106a00e0dde9abd295dc921306b8de63025571f.tar.gz libssh-a106a00e0dde9abd295dc921306b8de63025571f.tar.xz libssh-a106a00e0dde9abd295dc921306b8de63025571f.zip |
options: Do not crash when setting knownhosts to NULL (T108)
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/options.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/options.c b/src/options.c index 576af075..57e2197c 100644 --- a/src/options.c +++ b/src/options.c @@ -605,12 +605,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, v = value; SAFE_FREE(session->opts.knownhosts); if (v == NULL) { - session->opts.knownhosts = ssh_path_expand_escape(session, - "%d/known_hosts"); - if (session->opts.knownhosts == NULL) { - ssh_set_error_oom(session); - return -1; - } + /* The default value will be set by the ssh_options_apply() */ } else if (v[0] == '\0') { ssh_set_error_invalid(session); return -1; |