Skip to content

Commit

Permalink
Fixed possible overflow error for large arrays in binary search.
Browse files Browse the repository at this point in the history
  • Loading branch information
mutexlox committed Sep 30, 2011
1 parent b5ede32 commit 4da4895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel.txt
Expand Up @@ -260,7 +260,7 @@ int groups_search(const struct group_info *group_info, gid_t grp)

while (left < right) {

unsigned int mid = (left+right)/2;
unsigned int mid = left + (right - left)/2;

if (grp > GROUP_AT(group_info, mid))

Expand Down

0 comments on commit 4da4895

Please sign in to comment.