aboutsummaryrefslogtreecommitdiff
path: root/libssh/kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/kex.c')
-rw-r--r--libssh/kex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index ca678947..17c27460 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -333,7 +333,10 @@ void ssh_list_kex(ssh_session session, KEX *kex) {
#ifdef DEBUG_CRYPTO
ssh_print_hexa("session cookie", kex->cookie, 16);
#endif
-
+ if(kex->methods==NULL){
+ ssh_log(session, SSH_LOG_RARE,"kex->methods is NULL");
+ return;
+ }
for(i = 0; i < 10; i++) {
ssh_log(session, SSH_LOG_FUNCTIONS, "%s: %s",
ssh_kex_nums[i], kex->methods[i]);