mirror of
https://github.com/git/git.git
synced 2024-09-28 16:13:01 +02:00
Merge branch 'rg/copy-gecos-username'
* rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&"
This commit is contained in:
commit
ac39c5f554
1
ident.c
1
ident.c
@ -34,6 +34,7 @@ static void copy_gecos(const struct passwd *w, char *name, size_t sz)
|
||||
*dst++ = toupper(*w->pw_name);
|
||||
memcpy(dst, w->pw_name + 1, nlen - 1);
|
||||
dst += nlen - 1;
|
||||
len += nlen;
|
||||
}
|
||||
}
|
||||
if (len < sz)
|
||||
|
Loading…
Reference in New Issue
Block a user