diff options
Diffstat (limited to 'openbsd-compat/glob.c')
-rw-r--r-- | openbsd-compat/glob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index 9e7ff9e76..f522e6dde 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: glob.c,v 1.40 2013/09/30 12:02:34 millert Exp $ */ | 1 | /* $OpenBSD: glob.c,v 1.41 2014/10/08 05:35:27 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1989, 1993 | 3 | * Copyright (c) 1989, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -828,7 +828,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp, | |||
828 | return(GLOB_NOSPACE); | 828 | return(GLOB_NOSPACE); |
829 | } | 829 | } |
830 | 830 | ||
831 | pathv = realloc(pglob->gl_pathv, newn * sizeof(*pathv)); | 831 | pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv)); |
832 | if (pathv == NULL) | 832 | if (pathv == NULL) |
833 | goto nospace; | 833 | goto nospace; |
834 | if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { | 834 | if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { |
@@ -840,7 +840,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp, | |||
840 | pglob->gl_pathv = pathv; | 840 | pglob->gl_pathv = pathv; |
841 | 841 | ||
842 | if ((pglob->gl_flags & GLOB_KEEPSTAT) != 0) { | 842 | if ((pglob->gl_flags & GLOB_KEEPSTAT) != 0) { |
843 | statv = realloc(pglob->gl_statv, newn * sizeof(*statv)); | 843 | statv = reallocarray(pglob->gl_statv, newn, sizeof(*statv)); |
844 | if (statv == NULL) | 844 | if (statv == NULL) |
845 | goto nospace; | 845 | goto nospace; |
846 | if (pglob->gl_statv == NULL && pglob->gl_offs > 0) { | 846 | if (pglob->gl_statv == NULL && pglob->gl_offs > 0) { |