tor

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

commit accb734c5fc45481231b837cae1244129144df06
parent decb9276852b4cb7f9f2472c81cd47fbab60845f
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri, 28 Jul 2017 10:26:06 -0400

Turn base < 0 into a BUG() in our long-parse functions.

Diffstat:
Msrc/common/util.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/common/util.c b/src/common/util.c @@ -1172,7 +1172,7 @@ tor_parse_long(const char *s, int base, long min, long max, char *endptr; long r; - if (base < 0) { + if (BUG(base < 0)) { if (ok) *ok = 0; return 0; @@ -1191,7 +1191,7 @@ tor_parse_ulong(const char *s, int base, unsigned long min, char *endptr; unsigned long r; - if (base < 0) { + if (BUG(base < 0)) { if (ok) *ok = 0; return 0; @@ -1223,7 +1223,7 @@ tor_parse_uint64(const char *s, int base, uint64_t min, char *endptr; uint64_t r; - if (base < 0) { + if (BUG(base < 0)) { if (ok) *ok = 0; return 0;