sudoers plugin: silence most -Wconversion warnings.

This commit is contained in:
Todd C. Miller
2023-07-07 15:07:04 -06:00
parent 4891f37a45
commit a38b714667
58 changed files with 352 additions and 322 deletions

View File

@@ -360,7 +360,7 @@ testsudoers_getgrouplist2(const char *name, GETGROUPS_T basegid,
grpsize = sysconf(_SC_NGROUPS_MAX);
if (grpsize < 0)
grpsize = NGROUPS_MAX;
groups = reallocarray(NULL, grpsize, 4 * sizeof(*groups));
groups = reallocarray(NULL, (size_t)grpsize, 4 * sizeof(*groups));
if (groups == NULL)
return -1;
grpsize <<= 2;
@@ -398,7 +398,7 @@ testsudoers_getgrouplist2(const char *name, GETGROUPS_T basegid,
/* Static group vector. */
goto done;
}
tmp = reallocarray(groups, grpsize, 2 * sizeof(*groups));
tmp = reallocarray(groups, (size_t)grpsize, 2 * sizeof(*groups));
if (tmp == NULL) {
free(groups);
groups = NULL;