diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/friend_requests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/friend_requests.c b/core/friend_requests.c index d4f8dd63..00beaa14 100644 --- a/core/friend_requests.c +++ b/core/friend_requests.c | |||
@@ -33,7 +33,7 @@ uint8_t self_public_key[crypto_box_PUBLICKEYBYTES]; | |||
33 | return the number of peers it was routed through if it did not send it directly.*/ | 33 | return the number of peers it was routed through if it did not send it directly.*/ |
34 | int send_friendrequest(uint8_t * public_key, uint32_t nospam_num, uint8_t * data, uint32_t length) | 34 | int send_friendrequest(uint8_t * public_key, uint32_t nospam_num, uint8_t * data, uint32_t length) |
35 | { | 35 | { |
36 | if(length - sizeof(nospam_num) > MAX_DATA_SIZE) | 36 | if(length + sizeof(nospam_num) > MAX_DATA_SIZE) |
37 | return -1; | 37 | return -1; |
38 | 38 | ||
39 | uint8_t temp[MAX_DATA_SIZE]; | 39 | uint8_t temp[MAX_DATA_SIZE]; |