summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-10-18 11:37:10 +0200
committerPatrick Steinhardt <ps@pks.im>2018-10-18 11:49:23 +0200
commit68deb2cc80ef19bf3a1915c26b5308b283a6d69a (patch)
tree341c986f2e7790fc28fdf33d207b4787a772be42 /src
parent1a2efd10bde66f798375e2f47ba57ef00ad5c193 (diff)
downloadlibgit2-68deb2cc80ef19bf3a1915c26b5308b283a6d69a.tar.gz
util: remove unsafe `git__strtol64` function
The function `git__strtol64` does not take a maximum buffer length as parameter. This has led to some unsafe usages of this function, and as such we may consider it as being unsafe to use. As we have now eradicated all usages of this function, let's remove it completely to avoid future misuse.
Diffstat (limited to 'src')
-rw-r--r--src/util.c6
-rw-r--r--src/util.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/src/util.c b/src/util.c
index 79b362f7f..099a28a2a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -68,12 +68,6 @@ int git_strarray_copy(git_strarray *tgt, const git_strarray *src)
return 0;
}
-int git__strtol64(int64_t *result, const char *nptr, const char **endptr, int base)
-{
-
- return git__strntol64(result, nptr, (size_t)-1, endptr, base);
-}
-
int git__strntol64(int64_t *result, const char *nptr, size_t nptr_len, const char **endptr, int base)
{
const char *p;
diff --git a/src/util.h b/src/util.h
index b6f5b7519..646631bcf 100644
--- a/src/util.h
+++ b/src/util.h
@@ -60,7 +60,6 @@ GIT_INLINE(int) git__signum(int val)
extern int git__strtol32(int32_t *n, const char *buff, const char **end_buf, int base);
extern int git__strntol32(int32_t *n, const char *buff, size_t buff_len, const char **end_buf, int base);
-extern int git__strtol64(int64_t *n, const char *buff, const char **end_buf, int base);
extern int git__strntol64(int64_t *n, const char *buff, size_t buff_len, const char **end_buf, int base);