ensure that the group table isn't overflowed.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-05-23 16:01:26 +02:00
parent 618a386f73
commit d3f701fba5

View File

@@ -339,7 +339,7 @@ static void plain_group_list(void *pool, void *additional, char ***groupname, un
}
p = htable_first(&hash, &iter);
while (p != NULL) {
while (p != NULL && (*groupname_size) < MAX_GROUPS) {
(*groupname)[(*groupname_size)] = talloc_strdup(*groupname, p);
p = htable_next(&hash, &iter);
(*groupname_size)++;