summaryrefslogtreecommitdiff
path: root/core/friend_requests.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/friend_requests.c')
-rw-r--r--core/friend_requests.c2
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.*/
34int send_friendrequest(uint8_t * public_key, uint32_t nospam_num, uint8_t * data, uint32_t length) 34int 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];