From: Andreas Gustafsson Date: Tue, 11 Jul 2000 04:55:09 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.0.0rc1~29 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=eaed97b795937ea6274cdf3b0a30d63c0076bb27;p=thirdparty%2Fbind9.git pullup: 325. [bug] isc_lex_gettoken was processing octal strings when ISC_LEXOPT_CNUMBER was not set. --- diff --git a/CHANGES b/CHANGES index 5396613c29a..d59145f97b9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ + 325. [bug] isc_lex_gettoken was processing octal strings when + ISC_LEXOPT_CNUMBER was not set. + 324. [func] In the resolver, turn EDNS0 off if there is no response after a number of retransmissions. This is to allow queries some chance of succeeding diff --git a/lib/isc/lex.c b/lib/isc/lex.c index ae10a895969..b52a15e71ac 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: lex.c,v 1.31.2.1 2000/07/10 19:13:09 gson Exp $ */ +/* $Id: lex.c,v 1.31.2.2 2000/07/11 04:55:09 gson Exp $ */ #include @@ -511,8 +511,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { if (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == EOF || lex->specials[c]) { + int base; + if ((options & ISC_LEXOPT_CNUMBER) != 0) + base = 0; + else + base = 10; pushback(source, c); - ulong = strtoul(lex->data, &e, 0); + ulong = strtoul(lex->data, &e, base); if (ulong == ULONG_MAX && errno == ERANGE) { return (ISC_R_RANGE);