From 49cb21b22d72169517c8a2137db8bcac883ad2cc Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 17 Aug 2013 10:22:15 +0200 Subject: Make handshake records const uint8_t* instead of void* This enforces explicit casting and thus avoids alignment problems. --- src/protocol_ec25519_fhmqvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocol_ec25519_fhmqvc.c') diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index f96e8c4..cd4eb30 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -707,7 +707,7 @@ static void protocol_handshake_handle(fastd_context_t *ctx, fastd_socket_t *sock } if (handshake->records[RECORD_VERSION_NAME].data) - peer_version_name = strndup(handshake->records[RECORD_VERSION_NAME].data, handshake->records[RECORD_VERSION_NAME].length); + peer_version_name = strndup((const char*)handshake->records[RECORD_VERSION_NAME].data, handshake->records[RECORD_VERSION_NAME].length); pr_verbose(ctx, "received handshake from %P[%I] using fastd %s", peer, remote_addr, peer_version_name); free(peer_version_name); @@ -730,7 +730,7 @@ static void protocol_handshake_handle(fastd_context_t *ctx, fastd_socket_t *sock } if (handshake->records[RECORD_VERSION_NAME].data) - peer_version_name = strndup(handshake->records[RECORD_VERSION_NAME].data, handshake->records[RECORD_VERSION_NAME].length); + peer_version_name = strndup((const char*)handshake->records[RECORD_VERSION_NAME].data, handshake->records[RECORD_VERSION_NAME].length); pr_verbose(ctx, "received handshake response from %P[%I] using fastd %s", peer, remote_addr, peer_version_name); free(peer_version_name); -- cgit v1.2.3