From: Todd C. Miller Date: Tue, 5 Feb 2019 23:46:30 +0000 (-0700) Subject: In sudo_make_grlist_item() the calculation of total did not include X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c92f80b79e739675adc52fe260e11bace140bf39;p=sudo In sudo_make_grlist_item() the calculation of total did not include space for pointers to the group names. --- 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: