Skip to content

Commit

Permalink
Merge branch 'rf/maint-mailmap-off-by-one' into maint
Browse files Browse the repository at this point in the history
* rf/maint-mailmap-off-by-one:
  mailmap: avoid out-of-bounds memory access
  • Loading branch information
Junio C Hamano committed Nov 20, 2012
2 parents 35cae74 + 3174bc5 commit e87719f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mailmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e87719f

Please sign in to comment.