Skip to content

Commit

Permalink
Fixes incorrect indexing of KEX prefs string
Browse files Browse the repository at this point in the history
After stripping out an invalid KEX pref entry, it would incorrectly advance again leaving invalid values in the list.
  • Loading branch information
willco007 authored Mar 15, 2018
1 parent 42cf291 commit 40a79d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kex.c
Original file line number Diff line number Diff line change
Expand Up @@ -3527,8 +3527,9 @@ libssh2_session_method_pref(LIBSSH2_SESSION * session, int method_type,
}
}
}

s = p ? (p + 1) : NULL;
else {
s = p ? (p + 1) : NULL;
}
}

if(strlen(newprefs) == 0) {
Expand Down

0 comments on commit 40a79d3

Please sign in to comment.