summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-17 10:22:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-17 10:22:15 +0200
commit49cb21b22d72169517c8a2137db8bcac883ad2cc (patch)
treebd6461616c4290fbe55e5d45ae70b31efc93b9d6 /src/protocol_ec25519_fhmqvc.c
parent00d7406fe26bbcbad2945a0b4e3666dd991daac4 (diff)
downloadfastd-49cb21b22d72169517c8a2137db8bcac883ad2cc.tar
fastd-49cb21b22d72169517c8a2137db8bcac883ad2cc.zip
Make handshake records const uint8_t* instead of void*
This enforces explicit casting and thus avoids alignment problems.
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r--src/protocol_ec25519_fhmqvc.c4
1 files changed, 2 insertions, 2 deletions
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);