This commit is contained in:
irungentoo 2013-08-16 11:07:32 -04:00
commit 173101624c
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ else()
include_directories(${SODIUM_INCLUDE_DIR})
set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY})
set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARIES})
endif()
#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail

View File

@ -54,8 +54,8 @@ endif()
find_library(SODIUM_LIBRARY
NAMES
${WIN32_LIBSODIUM_FILENAME}
sodium
${WIN32_LIBSODIUM_FILENAME}
PATHS
${SODIUM_ROOT_DIR}/lib
)

View File

@ -33,7 +33,7 @@ uint8_t self_public_key[crypto_box_PUBLICKEYBYTES];
return the number of peers it was routed through if it did not send it directly.*/
int send_friendrequest(uint8_t * public_key, uint32_t nospam_num, uint8_t * data, uint32_t length)
{
if(length - sizeof(nospam_num) > MAX_DATA_SIZE)
if(length + sizeof(nospam_num) > MAX_DATA_SIZE)
return -1;
uint8_t temp[MAX_DATA_SIZE];