summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index 15a195fe5..ab475a8f8 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -240,7 +240,7 @@ int git_commit__parse(void *_commit, git_odb_object *odb_obj)
buffer_end = buffer + git_odb_object_size(odb_obj);
buffer += header_len;
- if (*buffer == '\n')
+ while (buffer < buffer_end && *buffer == '\n')
++buffer;
/* extract commit message */