mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Merge remote-tracking branch 'teor/bug21507-029'
This commit is contained in:
commit
ef610467fa
5
changes/bug21507
Normal file
5
changes/bug21507
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Minor bugfixes (voting consistency):
|
||||||
|
- Reject version numbers with non-numeric prefixes (such as +, -, and
|
||||||
|
whitespace). Disallowing whitespace prevents differential version
|
||||||
|
parsing between POSIX-based and Windows platforms.
|
||||||
|
Fixes bug 21507 and part of 21508; bugfix on 0.0.8pre1.
|
@ -4894,6 +4894,8 @@ tor_version_parse(const char *s, tor_version_t *out)
|
|||||||
|
|
||||||
#define NUMBER(m) \
|
#define NUMBER(m) \
|
||||||
do { \
|
do { \
|
||||||
|
if (!cp || *cp < '0' || *cp > '9') \
|
||||||
|
return -1; \
|
||||||
out->m = (int)tor_parse_uint64(cp, 10, 0, INT32_MAX, &ok, &eos); \
|
out->m = (int)tor_parse_uint64(cp, 10, 0, INT32_MAX, &ok, &eos); \
|
||||||
if (!ok) \
|
if (!ok) \
|
||||||
return -1; \
|
return -1; \
|
||||||
|
Loading…
Reference in New Issue
Block a user