summaryrefslogtreecommitdiffstats
path: root/libssh/kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/kex.c')
-rw-r--r--libssh/kex.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index db86c8c..e325aed 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -353,9 +353,17 @@ static STRING *make_rsa1_string(STRING *e, STRING *n){
return ret;
}
+/* TODO FIXME add return value and error checking in callers */
static void build_session_id1(SSH_SESSION *session, STRING *servern,
STRING *hostn){
- MD5CTX md5=md5_init();
+ MD5CTX md5;
+
+ md5 = md5_init();
+ if (md5 == NULL) {
+ return;
+ }
+
+
#ifdef DEBUG_CRYPTO
ssh_print_hexa("host modulus",hostn->string,string_len(hostn));
ssh_print_hexa("server modulus",servern->string,string_len(servern));