From 323ee63a1d267548b60492a4f94ade2e29d6fce7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 7 Apr 2009 18:38:09 +0000 Subject: Add return value and error checks to make_sessionid(). git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@418 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libssh/client.c') diff --git a/libssh/client.c b/libssh/client.c index e64ae021..63c5de6d 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -212,7 +212,11 @@ static int dh_handshake(SSH_SESSION *session){ return ret; } ssh_log(session, SSH_LOG_RARE, "Got SSH_MSG_NEWKEYS\n"); - make_sessionid(session); + ret = make_sessionid(session); + if (ret != SSH_OK) { + leave_function(); + return SSH_ERROR; + } /* set the cryptographic functions for the next crypto */ /* (it is needed for generate_session_keys for key lenghts) */ if(crypt_set_algorithms(session)){ -- cgit