dh: Fix packing a pointer into the buffer.

Thanks to Giovanni Panozzo <giovanni@panozzo.it>.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2014-08-25 12:23:17 +02:00
parent 173994786b
commit 86294ad3ea

View File

@@ -615,9 +615,9 @@ int make_sessionid(ssh_session session) {
rc = ssh_buffer_pack(buf,
"dPdP",
CURVE25519_PUBKEY_SIZE,
session->next_crypto->curve25519_client_pubkey,
(size_t)CURVE25519_PUBKEY_SIZE, session->next_crypto->curve25519_client_pubkey,
CURVE25519_PUBKEY_SIZE,
session->next_crypto->curve25519_server_pubkey);
(size_t)CURVE25519_PUBKEY_SIZE, session->next_crypto->curve25519_server_pubkey);
if (rc != SSH_OK) {
goto error;