diff --git a/plugins/sudoers/pwutil_impl.c b/plugins/sudoers/pwutil_impl.c index b6251ff87..76230a332 100644 --- a/plugins/sudoers/pwutil_impl.c +++ b/plugins/sudoers/pwutil_impl.c @@ -353,6 +353,7 @@ sudo_make_grlist_item(const struct passwd *pw, char * const *unused1) /* Allocate in one big chunk for easy freeing. */ nsize = strlen(pw->pw_name) + 1; total = sizeof(*grlitem) + nsize; + total += sizeof(char *) * gidlist->ngids; total += groupname_len * gidlist->ngids; again: