summaryrefslogtreecommitdiff
path: root/src/commit_list.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-10-25 11:21:14 +0200
committerGitHub <noreply@github.com>2018-10-25 11:21:14 +0200
commitbea65980c7a42e34edfafbdc40b199ba7b2a564e (patch)
tree0d2e8e646b4c8f6ecff728c03a3fc3652eb3238f /src/commit_list.c
parent1194546138cbbe3d822e4df2a41179a847099e75 (diff)
parentea19efc19fa683d632af3e172868bc4350724813 (diff)
downloadlibgit2-bea65980c7a42e34edfafbdc40b199ba7b2a564e.tar.gz
Merge pull request #4851 from pks-t/pks/strtol-removal
strtol removal
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 96bd9dc15..b4313eed2 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;