diff options
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c index e2d3d346b..c7b83ed43 100644 --- a/src/commit.c +++ b/src/commit.c @@ -189,8 +189,8 @@ int git_commit__parse_buffer(git_commit *commit, const void *data, size_t len) buffer = eoln; } - /* skip blank lines */ - while (buffer < buffer_end - 1 && *buffer == '\n') + /* buffer is now at the end of the header, double-check and move forward into the message */ + if (buffer < buffer_end && *buffer == '\n') buffer++; /* parse commit message */ |