diff options
author | irungentoo <irungentoo@gmail.com> | 2014-07-08 10:38:48 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-07-08 10:38:48 -0400 |
commit | 2772bffeebcda9c1947c9855fc4ad42ddb32cbea (patch) | |
tree | eeb53a529bb300d41ff24e6b6909e15838b36a5c /toxcore | |
parent | 95d737cb5f16df4d22eecc2a947b4e9689be754e (diff) |
Fixed possible out of bounds read.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/onion_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 7d0efc79..42982ea8 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -831,7 +831,7 @@ int onion_delfriend(Onion_Client *onion_c, int friend_num) | |||
831 | uint32_t i; | 831 | uint32_t i; |
832 | 832 | ||
833 | for (i = onion_c->num_friends; i != 0; --i) { | 833 | for (i = onion_c->num_friends; i != 0; --i) { |
834 | if (onion_c->friends_list[i].status != 0) | 834 | if (onion_c->friends_list[i - 1].status != 0) |
835 | break; | 835 | break; |
836 | } | 836 | } |
837 | 837 | ||