summaryrefslogtreecommitdiff
path: root/include/git2/common.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-04-09 15:22:11 -0700
committerVicent Marti <tanoku@gmail.com>2011-04-09 15:22:11 -0700
commitc6e65acae63bd9b251140184679ab4ea0ec5c1a9 (patch)
tree42e304af6ea9be7f4f35e3beca314fccc9fddd27 /include/git2/common.h
parentb918ae40d1dc5116d7631ef822d7b5b39a622c81 (diff)
downloadlibgit2-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 'include/git2/common.h')
-rw-r--r--include/git2/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index e0c6bc54..22c7cc46 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -164,6 +164,12 @@
/** A reference with this name already exists */
#define GIT_EEXISTS (GIT_ERROR - 23)
+/** The given integer literal is too large to be parsed */
+#define GIT_EOVERFLOW (GIT_ERROR - 24)
+
+/** The given literal is not a valid number */
+#define GIT_ENOTNUM (GIT_ERROR - 25)
+
GIT_BEGIN_DECL
typedef struct {