aboutsummaryrefslogtreecommitdiff
path: root/nscd/pwdcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/pwdcache.c')
-rw-r--r--nscd/pwdcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 85b4fe9..12d18dd 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -146,15 +146,15 @@ save_pwd (struct passwd *src)
cp = (char *) (dest + 1);
dest->pw_name = cp;
- cp = mempcpy (cp, src->pw_name, name_len);
+ cp = mempcpy (cp, src->pw_name, name_len) + 1;
dest->pw_passwd = cp;
- cp = mempcpy (cp, src->pw_passwd, passwd_len);
+ cp = mempcpy (cp, src->pw_passwd, passwd_len) + 1;
dest->pw_uid = src->pw_uid;
dest->pw_gid = src->pw_gid;
dest->pw_gecos = cp;
- cp = mempcpy (cp, src->pw_gecos, gecos_len);
+ cp = mempcpy (cp, src->pw_gecos, gecos_len) + 1;
dest->pw_dir = cp;
- cp = mempcpy (cp, src->pw_dir, dir_len);
+ cp = mempcpy (cp, src->pw_dir, dir_len) + 1;
dest->pw_shell = cp;
mempcpy (cp, src->pw_shell, shell_len);