summaryrefslogtreecommitdiff
path: root/src/commit_list.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_list.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_list.c')
-rw-r--r--src/commit_list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commit_list.c b/src/commit_list.c
index 3bba58c27..7df79bfd6 100644
--- a/src/commit_list.c
+++ b/src/commit_list.c
@@ -171,7 +171,9 @@ static int commit_quick_parse(
buffer--;
}
- if ((buffer == committer_start) || (git__strtol64(&commit_time, (char *)(buffer + 1), NULL, 10) < 0))
+ if ((buffer == committer_start) ||
+ (git__strntol64(&commit_time, (char *)(buffer + 1),
+ buffer_end - buffer + 1, NULL, 10) < 0))
return commit_error(commit, "cannot parse commit time");
commit->time = commit_time;