summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-19 20:37:21 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-19 20:37:21 -0700
commitac39c5f554f80b5baddea9a6e6b5ff53cb92b6e3 (patch)
tree4103889e7fe19f3c82d6b1920a81f314b846c1fe
parent1d699f79340b40b8020d9ed570aab124186fbd97 (diff)
parentc0336ff27a9a4bf9db87d65c5dec1ebf7dd9f8c6 (diff)
downloadgit-ac39c5f554f80b5baddea9a6e6b5ff53cb92b6e3.tar.gz
Merge branch 'rg/copy-gecos-username'
* rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&"
-rw-r--r--ident.c1
1 files changed, 1 insertions, 0 deletions
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)