summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index aada266f9a..ee49c1ce25 100644
--- a/commit.c
+++ b/commit.c
@@ -1354,8 +1354,8 @@ static struct commit_extra_header *read_commit_extra_header_lines(
strbuf_reset(&buf);
it = NULL;
- eof = strchr(line, ' ');
- if (next <= eof)
+ eof = memchr(line, ' ', next - line);
+ if (!eof)
eof = next;
if (standard_header_field(line, eof - line) ||