summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
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);