diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-10-26 12:33:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 12:33:59 +0200 |
| commit | 623647af9959e0ce8d265ef0060a01b0da6b5fd4 (patch) | |
| tree | c5e3b2209d42ad60231138f4e1eb8e913e1f92ba /src/commit.c | |
| parent | 814389d400b17cf5cce7862ca802d5a3eedba541 (diff) | |
| parent | 7655b2d89e8275853d9921dd903dcdad9b3d4a7b (diff) | |
| download | libgit2-623647af9959e0ce8d265ef0060a01b0da6b5fd4.tar.gz | |
Merge pull request #4864 from pks-t/pks/object-parse-fixes
Object parse fixes
Diffstat (limited to 'src/commit.c')
| -rw-r--r-- | src/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c index 97ac2a189..bda5a8b42 100644 --- a/src/commit.c +++ b/src/commit.c @@ -444,7 +444,7 @@ int git_commit__parse_raw(void *_commit, const char *data, size_t size) 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); |
