diff options
Diffstat (limited to 'lib/libc/gen/wordexp.c')
-rw-r--r-- | lib/libc/gen/wordexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/wordexp.c b/lib/libc/gen/wordexp.c index 3791e1e..dda6aba 100644 --- a/lib/libc/gen/wordexp.c +++ b/lib/libc/gen/wordexp.c @@ -234,8 +234,8 @@ we_askshell(const char *words, wordexp_t *we, int flags) vofs += we->we_offs; we->we_wordc += nwords; we->we_nbytes += nbytes; - if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + - (flags & WRDE_DOOFFS ? we->we_offs : 0)) * + if ((nwv = reallocarray(we->we_wordv, (we->we_wordc + 1 + + (flags & WRDE_DOOFFS ? we->we_offs : 0)), sizeof(char *))) == NULL) { error = WRDE_NOSPACE; goto cleanup; |