mirror of
https://github.com/TokTok/c-toxcore
synced 2026-06-04 16:51:45 +00:00
Fixed possible out of bounds read.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user