summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index 40f477fd..15f554e2 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -900,7 +900,8 @@ static bool incorrect_hardening(const IPPTsPng *assoc)
900 900
901static int cmp_dht_entry(const void *a, const void *b) 901static int cmp_dht_entry(const void *a, const void *b)
902{ 902{
903 DHT_Cmp_data cmp1, cmp2; 903 DHT_Cmp_data cmp1;
904 DHT_Cmp_data cmp2;
904 memcpy(&cmp1, a, sizeof(DHT_Cmp_data)); 905 memcpy(&cmp1, a, sizeof(DHT_Cmp_data));
905 memcpy(&cmp2, b, sizeof(DHT_Cmp_data)); 906 memcpy(&cmp2, b, sizeof(DHT_Cmp_data));
906 const Client_data entry1 = cmp1.entry; 907 const Client_data entry1 = cmp1.entry;
@@ -2418,7 +2419,8 @@ static int handle_hardening(void *object, IP_Port source, const uint8_t *source_
2418 return 1; 2419 return 1;
2419 } 2420 }
2420 2421
2421 Node_format node, tocheck_node; 2422 Node_format node;
2423 Node_format tocheck_node;
2422 node.ip_port = source; 2424 node.ip_port = source;
2423 memcpy(node.public_key, source_pubkey, CRYPTO_PUBLIC_KEY_SIZE); 2425 memcpy(node.public_key, source_pubkey, CRYPTO_PUBLIC_KEY_SIZE);
2424 memcpy(&tocheck_node, packet + 1, sizeof(Node_format)); 2426 memcpy(&tocheck_node, packet + 1, sizeof(Node_format));