mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Spec conformance on protover: always reject ranges where lo>hi
This commit is contained in:
+3
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user