diff options
author | Roman Proskuryakov <humbug@deeptown.org> | 2016-01-24 19:16:40 +0300 |
---|---|---|
committer | Roman Proskuryakov <humbug@deeptown.org> | 2016-01-27 02:14:59 +0300 |
commit | ed3a794c9bf6380801ee21c816505f457b6a1348 (patch) | |
tree | 14e1b8fa1c8c1b7f45b08bae5e0b6169054c3751 /toxcore/ping.c | |
parent | 61f8e65c0157049ac26bf9b081ba6842d7defdeb (diff) |
fix: compare sensitive data with sodium_memcmp
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
Diffstat (limited to 'toxcore/ping.c')
-rw-r--r-- | toxcore/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/ping.c b/toxcore/ping.c index 2c6125e8..f81766cb 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c | |||
@@ -284,7 +284,7 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port) | |||
284 | return 0; | 284 | return 0; |
285 | } | 285 | } |
286 | 286 | ||
287 | if (memcmp(ping->to_ping[i].public_key, public_key, crypto_box_PUBLICKEYBYTES) == 0) { | 287 | if (public_key_cmp(ping->to_ping[i].public_key, public_key) == 0) { |
288 | return -1; | 288 | return -1; |
289 | } | 289 | } |
290 | } | 290 | } |