summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-10-26 14:54:25 +0200
committerGitHub <noreply@github.com>2018-10-26 14:54:25 +0200
commit32dc763c116999240440b5054798208d97b4c562 (patch)
tree8348a99862938d5d4ced1b8540c7674522489c1b /src/commit.c
parent2bd9b6b67706c8cb84d367f699cc9c48c2719dff (diff)
parent3b6e006e38ab0c41968f4135104162861fa3f984 (diff)
downloadlibgit2-maint/v0.26.tar.gz
Merge pull request #4865 from pks-t/pks/v0.26.8v0.26.8maint/v0.26
Release v0.26.8
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 4a340058a..0ec989421 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -442,7 +442,7 @@ int git_commit__parse(void *_commit, git_odb_object *odb_obj)
while (eoln < buffer_end && *eoln != '\n')
++eoln;
- if (git__prefixcmp(buffer, "encoding ") == 0) {
+ if (git__prefixncmp(buffer, buffer_end - buffer, "encoding ") == 0) {
buffer += strlen("encoding ");
commit->message_encoding = git__strndup(buffer, eoln - buffer);