summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-16 14:50:53 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-16 14:50:53 +0000
commitc6eb54c39e4663c8f9ea82e8bf29bfdb3c8d945a (patch)
tree6a5df0628e9356be11cac56f5068f5724f3b7709 /libssh/client.c
parente8a9cb25febeccd97aed9eb8e04da0b9f89b5a33 (diff)
downloadlibssh-c6eb54c39e4663c8f9ea82e8bf29bfdb3c8d945a.tar.gz
libssh-c6eb54c39e4663c8f9ea82e8bf29bfdb3c8d945a.tar.xz
libssh-c6eb54c39e4663c8f9ea82e8bf29bfdb3c8d945a.zip
Improve dh_import() functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@505 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c
index 70956c98..166eb3a7 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -251,7 +251,11 @@ static int dh_handshake(SSH_SESSION *session) {
rc = SSH_ERROR;
goto error;
}
- dh_import_f(session, f);
+ if (dh_import_f(session, f) < 0) {
+ ssh_set_error(session, SSH_FATAL, "Cannot import f number");
+ rc = SSH_ERROR;
+ goto error;
+ }
string_burn(f);
string_free(f);