Fixed possible out of bounds read.

This commit is contained in:
irungentoo 2014-07-08 10:38:48 -04:00
parent 95d737cb5f
commit 2772bffeeb
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -831,7 +831,7 @@ int onion_delfriend(Onion_Client *onion_c, int friend_num)
uint32_t i; uint32_t i;
for (i = onion_c->num_friends; i != 0; --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; break;
} }