Skip to content

Commit 93446aa

Browse files
committed
Merge branch 'rg/copy-gecos-username' into maint
* rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&"
2 parents 9e0ec12 + c0336ff commit 93446aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ident.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static void copy_gecos(const struct passwd *w, char *name, size_t sz)
3434
*dst++ = toupper(*w->pw_name);
3535
memcpy(dst, w->pw_name + 1, nlen - 1);
3636
dst += nlen - 1;
37+
len += nlen;
3738
}
3839
}
3940
if (len < sz)

0 commit comments

Comments
 (0)