diff options
author | Vicent Martà <vicent@github.com> | 2013-01-21 13:23:13 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-01-21 13:23:13 -0800 |
commit | 1bf7bee3bcaeb3587ca32a5bb6425e380b312d23 (patch) | |
tree | 179cc82ce56e41065718c00ce99ed27b38ddb50c /src | |
parent | d47c6aabfe8301577a6e4067aacd9ed6782e4035 (diff) | |
parent | 965e4e2d3182eb179e928191abfd446c0b652867 (diff) | |
download | libgit2-1bf7bee3bcaeb3587ca32a5bb6425e380b312d23.tar.gz |
Merge pull request #1265 from arrbee/parse-commit-time-as-uint64
Parse commit time as uint64_t to avoid overflow
Diffstat (limited to 'src')
-rw-r--r-- | src/signature.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signature.c b/src/signature.c index d77655315..3380097ff 100644 --- a/src/signature.c +++ b/src/signature.c @@ -241,15 +241,15 @@ static const char *scan_for_previous_token(const char *buffer, const char *left_ static int parse_time(git_time_t *time_out, const char *buffer) { - int time; int error; + int64_t time; if (*buffer == '+' || *buffer == '-') { giterr_set(GITERR_INVALID, "Failed while parsing time. '%s' actually looks like a timezone offset.", buffer); return -1; } - error = git__strtol32(&time, buffer, &buffer, 10); + error = git__strtol64(&time, buffer, &buffer, 10); if (!error) *time_out = (git_time_t)time; |