]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 04:55:09 +0000 (04:55 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 04:55:09 +0000 (04:55 +0000)
 325.   [bug]           isc_lex_gettoken was processing octal strings when
                        ISC_LEXOPT_CNUMBER was not set.

CHANGES
lib/isc/lex.c

diff --git a/CHANGES b/CHANGES
index 5396613c29abcf0ac7578ee3c37cbe00e0f494f1..d59145f97b96c047207648807cf864df19b251cb 100644 (file)
--- 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
index ae10a895969331fdf21094f7d9aee1e76c81fbf3..b52a15e71acc0aec138d3409db42066f559cfae3 100644 (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);