325.   [bug]           isc_lex_gettoken was processing octal strings when
                        ISC_LEXOPT_CNUMBER was not set.
This commit is contained in:
Andreas Gustafsson
2000-07-11 04:55:09 +00:00
parent 4e625c3501
commit eaed97b795
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -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
+7 -2
View File
@@ -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 <config.h>
@@ -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);