diff options
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 bdbf87558..df96f9d86 100644 --- a/src/revparse.c +++ b/src/revparse.c @@ -128,7 +128,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') @@ -578,7 +579,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); |