Skip to content

Instantly share code, notes, and snippets.

@xquery
Created March 8, 2020 10:21
Show Gist options
  • Save xquery/d080066425922f4ed634a5e17d328f51 to your computer and use it in GitHub Desktop.
Save xquery/d080066425922f4ed634a5e17d328f51 to your computer and use it in GitHub Desktop.
@@ -694,6 +694,9 @@ static CURLcode ssh_force_knownhost_key_type(struct connectdata *conn)
while(!libssh2_knownhost_get(sshc->kh, &store, store)) {
/* For non-standard ports, the name will be enclosed in */
/* square brackets, followed by a colon and the port */
+ if(store == NULL)
+ found = false;
+ break;
if(store->name[0] == '[') {
kh_name_end = strstr(store->name, "]:");
if(!kh_name_end) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment