Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rg/copy-gecos-username'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 20 May 2011 03:37:21 +0000
(20:37 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 20 May 2011 03:37:21 +0000
(20:37 -0700)
* rg/copy-gecos-username:
copy_gecos: fix not adding nlen to len when processing "&"
ident.c
patch
|
blob
|
history
raw
(from parent 1:
1d699f7
)
diff --git
a/ident.c
b/ident.c
index 1c4adb0a9a7e94936ba64d286cedd65f4b8255a6..8e56b5e941e85c9634d420a3e8140c328bca9c30 100644
(file)
--- 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)