summaryrefslogtreecommitdiff
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
parent095b3c49131abb84bc686636782901303f0489dd (diff)
parent03d69140e999a7a23e060e5a834cecf89d60a700 (diff)
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--cmake/FindSODIUM.cmake2
-rw-r--r--core/friend_requests.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86b5d27b..815616a7 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ else()
34 34
35 include_directories(${SODIUM_INCLUDE_DIR}) 35 include_directories(${SODIUM_INCLUDE_DIR})
36 36
37 set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY}) 37 set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARIES})
38endif() 38endif()
39 39
40#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail 40#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail
diff --git a/cmake/FindSODIUM.cmake b/cmake/FindSODIUM.cmake
index 2db0f667..6b0c2f23 100644
--- a/cmake/FindSODIUM.cmake
+++ b/cmake/FindSODIUM.cmake
@@ -54,8 +54,8 @@ endif()
54 54
55find_library(SODIUM_LIBRARY 55find_library(SODIUM_LIBRARY
56 NAMES 56 NAMES
57 ${WIN32_LIBSODIUM_FILENAME}
58 sodium 57 sodium
58 ${WIN32_LIBSODIUM_FILENAME}
59 PATHS 59 PATHS
60 ${SODIUM_ROOT_DIR}/lib 60 ${SODIUM_ROOT_DIR}/lib
61) 61)
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];