mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible out of bounds read.
This commit is contained in:
parent
95d737cb5f
commit
2772bffeeb
|
@ -831,7 +831,7 @@ int onion_delfriend(Onion_Client *onion_c, int friend_num)
|
|||
uint32_t i;
|
||||
|
||||
for (i = onion_c->num_friends; i != 0; --i) {
|
||||
if (onion_c->friends_list[i].status != 0)
|
||||
if (onion_c->friends_list[i - 1].status != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user