diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-09 09:55:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-28 10:21:29 -0400 |
commit | e37c1df9cd79bb8c540aded6ff35ea4cde8ddc60 (patch) | |
tree | 07c8efa107fbc3cf9cfbc3345a881015b43ce70e /src/or/dirserv.c | |
parent | d2713b4ddc9d8a98d4b687188bcf392fd3235994 (diff) | |
download | tor-e37c1df9cd79bb8c540aded6ff35ea4cde8ddc60.tar.gz tor-e37c1df9cd79bb8c540aded6ff35ea4cde8ddc60.zip |
Don't use "0" as a "base" argument to tor_parse_*().
Telling these functions to autodetect the numeric base has lead to
trouble in the past.
Fixes bug 22469. Bugfix on 0.2.2.various.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index e5654e3b90..01f70858ea 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2700,7 +2700,7 @@ measured_bw_line_parse(measured_bw_line_t *out, const char *orig_line) } cp+=strlen("bw="); - out->bw_kb = tor_parse_long(cp, 0, 0, LONG_MAX, &parse_ok, &endptr); + out->bw_kb = tor_parse_long(cp, 10, 0, LONG_MAX, &parse_ok, &endptr); if (!parse_ok || (*endptr && !TOR_ISSPACE(*endptr))) { log_warn(LD_DIRSERV, "Invalid bandwidth in bandwidth file line: %s", escaped(orig_line)); |