From a16de7a7cff14e133e01f5605f4600c67de5d91f Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Tue, 18 Apr 2017 13:43:55 +0200 Subject: consdiff: Reject ranges with non-numeric chars Fixes bug #21964 --- src/or/consdiff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/or/consdiff.c') 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; -- cgit v1.2.3-54-g00ecf