tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit c5295cc1beb1c13743e11d3a7134e9e75b6da470
parent 1fe0bae508120bbf4954de6b590dd0c722a883bc
Author: Nick Mathewson <nickm@torproject.org>
Date:   Thu, 15 Feb 2018 10:49:47 -0500

Spec conformance on protover: always reject ranges where lo>hi

Diffstat:
Msrc/or/protover.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/or/protover.c b/src/or/protover.c @@ -158,6 +158,9 @@ parse_version_range(const char *s, const char *end_of_range, if (next != end_of_range) goto error; + if (low > high) + goto error; + done: *high_out = high; *low_out = low; @@ -208,10 +211,6 @@ parse_single_entry(const char *s, const char *end_of_entry) goto error; } - if (range->low > range->high) { - goto error; - } - s = comma; while (*s == ',' && s < end_of_entry) ++s;