2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Use reallocarray where possible.

This commit is contained in:
Todd C. Miller
2015-05-14 10:21:58 -06:00
parent 3595807f4e
commit c75eb5bf0d
6 changed files with 12 additions and 12 deletions

View File

@@ -779,7 +779,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
return GLOB_NOSPACE;
}
pathv = realloc(pglob->gl_pathv, newn * sizeof(*pathv));
pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv));
if (pathv == NULL)
goto nospace;
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {