Skip to content

Commit

Permalink
Merge branch 'rf/maint-mailmap-off-by-one'
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
Jeff King committed Nov 4, 2012
2 parents 9a806be + 3174bc5 commit 0169320
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 0169320

Please sign in to comment.