summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2017-04-18 13:43:55 +0200
committerNick Mathewson <nickm@torproject.org>2017-04-24 09:33:48 -0400
commita16de7a7cff14e133e01f5605f4600c67de5d91f (patch)
tree20e666110493ddb381e249ec8efab7d6fc2c07ad /src/or
parentb081a7ed21ae729f6e195715e130edaca3e0b7fe (diff)
downloadtor-a16de7a7cff14e133e01f5605f4600c67de5d91f.tar.gz
tor-a16de7a7cff14e133e01f5605f4600c67de5d91f.zip
consdiff: Reject ranges with non-numeric chars
Fixes bug #21964
Diffstat (limited to 'src/or')
-rw-r--r--src/or/consdiff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/consdiff.c b/src/or/consdiff.c
index d2a2af1b5f..7e3d6749f6 100644
--- a/src/or/consdiff.c
+++ b/src/or/consdiff.c
@@ -757,6 +757,9 @@ get_linenum(const char **s, int *num_out)
{
int ok;
char *next;
+ if (!TOR_ISDIGIT(**s)) {
+ return -1;
+ }
*num_out = (int) tor_parse_long(*s, 10, 0, INT32_MAX, &ok, &next);
if (ok && next) {
*s = next;