aboutsummaryrefslogtreecommitdiff
path: root/src/dh.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-08-25 12:23:17 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-08-25 12:23:17 +0200
commit86294ad3ea506dd86503ad51cb03a33f6478f293 (patch)
tree6f9637a689c71cb914c260bac07aaa9d7dc87389 /src/dh.c
parent173994786b751899fc3b158901383e99a55ce97d (diff)
downloadlibssh-86294ad3ea506dd86503ad51cb03a33f6478f293.tar.gz
libssh-86294ad3ea506dd86503ad51cb03a33f6478f293.tar.xz
libssh-86294ad3ea506dd86503ad51cb03a33f6478f293.zip
dh: Fix packing a pointer into the buffer.
Thanks to Giovanni Panozzo <giovanni@panozzo.it>. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/dh.c')
-rw-r--r--src/dh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dh.c b/src/dh.c
index fc14ff60..e489a1d5 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -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;