diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-10-26 14:54:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 14:54:25 +0200 |
commit | 32dc763c116999240440b5054798208d97b4c562 (patch) | |
tree | 8348a99862938d5d4ced1b8540c7674522489c1b /src/revparse.c | |
parent | 2bd9b6b67706c8cb84d367f699cc9c48c2719dff (diff) | |
parent | 3b6e006e38ab0c41968f4135104162861fa3f984 (diff) | |
download | libgit2-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/revparse.c')
-rw-r--r-- | src/revparse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/revparse.c b/src/revparse.c index fd6bd1ea6..927e83073 100644 --- a/src/revparse.c +++ b/src/revparse.c @@ -127,7 +127,8 @@ static int try_parse_numeric(int *n, const char *curly_braces_content) int32_t content; const char *end_ptr; - if (git__strtol32(&content, curly_braces_content, &end_ptr, 10) < 0) + if (git__strntol32(&content, curly_braces_content, strlen(curly_braces_content), + &end_ptr, 10) < 0) return -1; if (*end_ptr != '\0') @@ -577,7 +578,7 @@ static int extract_how_many(int *n, const char *spec, size_t *pos) } while (spec[(*pos)] == kind && kind == '~'); if (git__isdigit(spec[*pos])) { - if (git__strtol32(&parsed, spec + *pos, &end_ptr, 10) < 0) + if (git__strntol32(&parsed, spec + *pos, strlen(spec + *pos), &end_ptr, 10) < 0) return GIT_EINVALIDSPEC; accumulated += (parsed - 1); |