diff options
author | Tyler Bunnell <tylerbunnell@gmail.com> | 2013-09-01 20:43:03 -0600 |
---|---|---|
committer | Tyler Bunnell <tylerbunnell@gmail.com> | 2013-09-01 20:43:03 -0600 |
commit | 36a3b02f63aedeeb09105832ba75252bc06b8598 (patch) | |
tree | c129a0d22d1ce39ba815d0ea1a5ac91ed7d634ae /toxcore | |
parent | d1c52788c5d4ec5f782df02f6851a74f5dff7da2 (diff) | |
parent | a1099d7f95591e125c12ba67917b1b9f9bb72933 (diff) |
Merge branch 'master' of github.com:tylerb/ProjectTox-Core
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/DHT.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 94168a69..9d5be369 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -982,6 +982,9 @@ static int send_NATping(DHT *dht, uint8_t *public_key, uint64_t ping_id, uint8_t | |||
982 | /* Handle a received ping request for. */ | 982 | /* Handle a received ping request for. */ |
983 | static int handle_NATping(void *object, IP_Port source, uint8_t *source_pubkey, uint8_t *packet, uint32_t length) | 983 | static int handle_NATping(void *object, IP_Port source, uint8_t *source_pubkey, uint8_t *packet, uint32_t length) |
984 | { | 984 | { |
985 | if (length != sizeof(uint64_t) + 1) | ||
986 | return 1; | ||
987 | |||
985 | DHT *dht = object; | 988 | DHT *dht = object; |
986 | uint64_t ping_id; | 989 | uint64_t ping_id; |
987 | memcpy(&ping_id, packet + 1, sizeof(uint64_t)); | 990 | memcpy(&ping_id, packet + 1, sizeof(uint64_t)); |