diff options
Diffstat (limited to 'libutil/pw_util.c')
-rw-r--r-- | libutil/pw_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c index e55c2b1..85b8d04 100644 --- a/libutil/pw_util.c +++ b/libutil/pw_util.c @@ -468,7 +468,7 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw) if (eof) break; while ((size_t)(q - p) >= size) { - if ((tmp = realloc(buf, size * 2)) == NULL) { + if ((tmp = reallocarray(buf, 2, size)) == NULL) { warnx("passwd line too long"); goto err; } |