summaryrefslogtreecommitdiff
path: root/core/friend_requests.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-16 11:07:32 -0400
committerirungentoo <irungentoo@gmail.com>2013-08-16 11:07:32 -0400
commit173101624cdb91a01b14938cbf475d89ef8f5d4d (patch)
treea8324d1e649731e756ed5ba30ce3ca1ca6958f8b /core/friend_requests.c
parent095b3c49131abb84bc686636782901303f0489dd (diff)
parent03d69140e999a7a23e060e5a834cecf89d60a700 (diff)
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
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];