mirror of
https://github.com/TokTok/c-toxcore
synced 2026-10-23 13:02:23 +00:00
Fixed possible buffer overflow in function to send friend requests.
This commit is contained in:
1 file changed
+1
-1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user