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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user