summaryrefslogtreecommitdiff
path: root/mailmap.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:14:28 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:14:29 -0800
commite87719fc944f8a9961ba9c371c485efe54dd08b5 (patch)
tree9dea82cfcd86dfa5e761fb7f065af088e53b3dac /mailmap.c
parentMerge branch 'jk/maint-diff-grep-textconv' into maint (diff)
parentmailmap: avoid out-of-bounds memory access (diff)
downloadtgif-e87719fc944f8a9961ba9c371c485efe54dd08b5.tar.xz
Merge branch 'rf/maint-mailmap-off-by-one' into maint
* rf/maint-mailmap-off-by-one: mailmap: avoid out-of-bounds memory access
Diffstat (limited to 'mailmap.c')
-rw-r--r--mailmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailmap.c b/mailmap.c
index 47aa419245..ea4b471ede 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -118,7 +118,7 @@ static char *parse_name_and_email(char *buffer, char **name,
while (isspace(*nstart) && nstart < left)
++nstart;
nend = left-1;
- while (isspace(*nend) && nend > nstart)
+ while (nend > nstart && isspace(*nend))
--nend;
*name = (nstart < nend ? nstart : NULL);