From c080569cacc6c3c31d339e234e6e69966b696397 Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Thu, 5 Apr 2018 11:28:32 -0400 Subject: [PATCH] GUACAMOLE-527: Fix issue with null host_key variable. --- src/common-ssh/ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common-ssh/ssh.c b/src/common-ssh/ssh.c index ee60ccf9..01d50003 100644 --- a/src/common-ssh/ssh.c +++ b/src/common-ssh/ssh.c @@ -520,7 +520,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client, libssh2_knownhost_readfile(ssh_known_hosts, known_hosts, LIBSSH2_KNOWNHOST_FILE_OPENSSH); /* Add host key provided from settings */ - if (strcmp(host_key, "") > 0) { + if (host_key && strcmp(host_key, "") > 0) { if (libssh2_knownhost_addc(ssh_known_hosts, hostname, NULL, host_key, strlen(host_key), NULL, 0, LIBSSH2_KNOWNHOST_TYPE_PLAIN|LIBSSH2_KNOWNHOST_KEYENC_BASE64|