Skip to content

Commit 0169320

Browse files
committed
Merge branch 'rf/maint-mailmap-off-by-one'
* rf/maint-mailmap-off-by-one: mailmap: avoid out-of-bounds memory access
2 parents 9a806be + 3174bc5 commit 0169320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mailmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static char *parse_name_and_email(char *buffer, char **name,
118118
while (isspace(*nstart) && nstart < left)
119119
++nstart;
120120
nend = left-1;
121-
while (isspace(*nend) && nend > nstart)
121+
while (nend > nstart && isspace(*nend))
122122
--nend;
123123

124124
*name = (nstart < nend ? nstart : NULL);

0 commit comments

Comments
 (0)