summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-28 14:03:20 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-28 14:03:20 -0400
commitec9c6d77234809d5bdc06357100ca4bffbbec18c (patch)
tree1eb406d547ce7084a9d45806a79a54feac5835a0 /src
parent40602537493409bcf3c4eaeda7fbee6c6eb3f329 (diff)
parent57154e71aa3b0ff205f2700e97f0ffe4531e1330 (diff)
downloadtor-ec9c6d77234809d5bdc06357100ca4bffbbec18c.tar.gz
tor-ec9c6d77234809d5bdc06357100ca4bffbbec18c.zip
Merge remote-tracking branch 'teor/bug21507-029' into maint-0.2.9
Diffstat (limited to 'src')
-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 2ee0d2720e..521e237be2 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -5621,6 +5621,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; \