diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-07 18:38:09 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-07 18:38:09 +0000 |
commit | 323ee63a1d267548b60492a4f94ade2e29d6fce7 (patch) | |
tree | b513441535706680159e9ea601b106acc9f2973b /libssh/client.c | |
parent | 1e52650dbfb5fb8949b91a0378d0b40df79af272 (diff) | |
download | libssh-323ee63a1d267548b60492a4f94ade2e29d6fce7.tar.gz libssh-323ee63a1d267548b60492a4f94ade2e29d6fce7.tar.xz libssh-323ee63a1d267548b60492a4f94ade2e29d6fce7.zip |
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
Diffstat (limited to 'libssh/client.c')
-rw-r--r-- | libssh/client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c index e64ae02..63c5de6 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)){ |