mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 18:22:09 +01:00
Turn base < 0 into a BUG() in our long-parse functions.
This commit is contained in:
parent
decb927685
commit
accb734c5f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user