Fixed possible buffer overflow in function to send friend requests.

This commit is contained in:
irungentoo committed 2014-04-19 16:18:07 -04:00
1 parent 98bea094b3
commit 235ce56855
1 file changed
+1 -1
+1 -1
View File
@@ -37,7 +37,7 @@
*/
int send_friendrequest(Onion_Client *onion_c, 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];