From: Junio C Hamano Date: Fri, 20 May 2011 03:37:21 +0000 (-0700) Subject: Merge branch 'rg/copy-gecos-username' X-Git-Tag: v1.7.6-rc0~49 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ac39c5f554f80b5baddea9a6e6b5ff53cb92b6e3?hp=1d699f79340b40b8020d9ed570aab124186fbd97 Merge branch 'rg/copy-gecos-username' * rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&" --- diff --git a/ident.c b/ident.c index 1c4adb0a9a..8e56b5e941 100644 --- a/ident.c +++ b/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)