summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-02-28 11:19:24 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-28 11:19:24 -0500
commitef610467fa5122740cb7a964376a440f31c41696 (patch)
tree25cbdfb541c9018da791fa7944ee03c0323ed690 /src/or/routerparse.c
parent242f9b3ffb6c100de5b9eb2cbccecbf07c68554f (diff)
parent57154e71aa3b0ff205f2700e97f0ffe4531e1330 (diff)
downloadtor-ef610467fa5122740cb7a964376a440f31c41696.tar.gz
tor-ef610467fa5122740cb7a964376a440f31c41696.zip
Merge remote-tracking branch 'teor/bug21507-029'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 98167d44f8..0336c035b4 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -4894,6 +4894,8 @@ tor_version_parse(const char *s, tor_version_t *out)
#define NUMBER(m) \
do { \
+ if (!cp || *cp < '0' || *cp > '9') \
+ return -1; \
out->m = (int)tor_parse_uint64(cp, 10, 0, INT32_MAX, &ok, &eos); \
if (!ok) \
return -1; \