From c92f80b79e739675adc52fe260e11bace140bf39 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 5 Feb 2019 16:46:30 -0700 Subject: [PATCH] In sudo_make_grlist_item() the calculation of total did not include space for pointers to the group names. --- plugins/sudoers/pwutil_impl.c | 1 + 1 file changed, 1 insertion(+) 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: -- 2.40.0