1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 23:07:55 +01:00

Merge branch 'rf/maint-mailmap-off-by-one'

* rf/maint-mailmap-off-by-one:
  mailmap: avoid out-of-bounds memory access
This commit is contained in:
Jeff King 2012-11-04 08:00:23 -05:00
commit 0169320374

View file

@ -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);