diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-04-09 15:22:11 -0700 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-04-09 15:22:11 -0700 |
| commit | c6e65acae63bd9b251140184679ab4ea0ec5c1a9 (patch) | |
| tree | 42e304af6ea9be7f4f35e3beca314fccc9fddd27 /src/util.h | |
| parent | b918ae40d1dc5116d7631ef822d7b5b39a622c81 (diff) | |
| download | libgit2-c6e65acae63bd9b251140184679ab4ea0ec5c1a9.tar.gz | |
Properly check `strtol` for errors
We are now using a custom `strtol` implementation to make sure we're not
missing any overflow errors.
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index f477b64fd..3c606493f 100644 --- a/src/util.h +++ b/src/util.h @@ -22,6 +22,8 @@ extern int git__fmt(char *, size_t, const char *, ...) extern int git__prefixcmp(const char *str, const char *prefix); extern int git__suffixcmp(const char *str, const char *suffix); +extern int git__strtol32(long *n, const char *buff, const char **end_buf, int base); + /* * The dirname() function shall take a pointer to a character string * that contains a pathname, and return a pointer to a string that is a |
