1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

dh: Check return value of buffer_add_ssh_string().

This commit is contained in:
Andreas Schneider
2013-06-17 12:53:26 +02:00
parent 9ee45a18d7
commit 4255a7223c

View File

@@ -765,8 +765,14 @@ int make_sessionid(ssh_session session) {
ssh_log(session,SSH_LOG_WARNING,"ECDH parameted missing");
goto error;
}
buffer_add_ssh_string(buf,session->next_crypto->ecdh_client_pubkey);
buffer_add_ssh_string(buf,session->next_crypto->ecdh_server_pubkey);
rc = buffer_add_ssh_string(buf,session->next_crypto->ecdh_client_pubkey);
if (rc < 0) {
goto error;
}
rc = buffer_add_ssh_string(buf,session->next_crypto->ecdh_server_pubkey);
if (rc < 0) {
goto error;
}
#endif
}
num = make_bignum_string(session->next_crypto->k);