diff options
Diffstat (limited to 'toxcore/ping.c')
-rw-r--r-- | toxcore/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/ping.c b/toxcore/ping.c index d2a01f5d..d15ccd47 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c | |||
@@ -125,7 +125,7 @@ static int send_ping_response(PING *ping, IP_Port ipp, const uint8_t *public_key | |||
125 | rc = encrypt_data_symmetric(shared_encryption_key, | 125 | rc = encrypt_data_symmetric(shared_encryption_key, |
126 | pk + 1 + crypto_box_PUBLICKEYBYTES, | 126 | pk + 1 + crypto_box_PUBLICKEYBYTES, |
127 | ping_plain, sizeof(ping_plain), | 127 | ping_plain, sizeof(ping_plain), |
128 | pk + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES ); | 128 | pk + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES); |
129 | 129 | ||
130 | if (rc != PING_PLAIN_SIZE + crypto_box_MACBYTES) { | 130 | if (rc != PING_PLAIN_SIZE + crypto_box_MACBYTES) { |
131 | return 1; | 131 | return 1; |
@@ -158,7 +158,7 @@ static int handle_ping_request(void *_dht, IP_Port source, const uint8_t *packet | |||
158 | packet + 1 + crypto_box_PUBLICKEYBYTES, | 158 | packet + 1 + crypto_box_PUBLICKEYBYTES, |
159 | packet + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, | 159 | packet + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, |
160 | PING_PLAIN_SIZE + crypto_box_MACBYTES, | 160 | PING_PLAIN_SIZE + crypto_box_MACBYTES, |
161 | ping_plain ); | 161 | ping_plain); |
162 | 162 | ||
163 | if (rc != sizeof(ping_plain)) { | 163 | if (rc != sizeof(ping_plain)) { |
164 | return 1; | 164 | return 1; |