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/circuitstats.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/circuitstats.c')
-rw-r--r-- | src/or/circuitstats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c index 51d580a1a4..963892c9d1 100644 --- a/src/or/circuitstats.c +++ b/src/or/circuitstats.c @@ -939,7 +939,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt, uint32_t count, k; build_time_t ms; int ok; - ms = (build_time_t)tor_parse_ulong(ms_str, 0, 0, + ms = (build_time_t)tor_parse_ulong(ms_str, 10, 0, CBT_BUILD_TIME_MAX, &ok, NULL); if (!ok) { log_warn(LD_GENERAL, "Unable to parse circuit build times: " @@ -949,7 +949,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt, smartlist_free(args); break; } - count = (uint32_t)tor_parse_ulong(count_str, 0, 0, + count = (uint32_t)tor_parse_ulong(count_str, 10, 0, UINT32_MAX, &ok, NULL); if (!ok) { log_warn(LD_GENERAL, "Unable to parse circuit build times: " |