Commit 5c0a4066 authored by Mark Andrews's avatar Mark Andrews
Browse files

325. [bug] isc_lex_gettoken was processing octal strings when

                        ISC_LEXOPT_CNUMBER was not set.
parent 6c3371d8
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.
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: lex.c,v 1.32 2000/07/10 05:11:17 marka Exp $ */
/* $Id: lex.c,v 1.33 2000/07/11 02:44:54 marka 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment