]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1161. [bug] named-checkzone looped on unbalanced brackets.
authorBrian Wellington <source@isc.org>
Thu, 13 Dec 2001 06:17:34 +0000 (06:17 +0000)
committerBrian Wellington <source@isc.org>
Thu, 13 Dec 2001 06:17:34 +0000 (06:17 +0000)
                        [RT #2248]

CHANGES
lib/isc/lex.c

diff --git a/CHANGES b/CHANGES
index bf7776042350eed4ea666e119da0302dab3e6f27..7ee47b0ffa7ba0d21d42835ad58529086c29fb99 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1161.  [bug]           named-checkzone looped on unbalanced brackets.
+                       [RT #2248]
+
 1160.  [bug]           Generating Diffie-Hellman keys longer than 1024
                        bits could fail. [RT #2241]
 
index 3066a67b2db4478430c57b7f305e9de3ee7dceaa..c69a52f2416383ff729aa4f595d102e265b924b7 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lex.c,v 1.66.2.2 2001/11/22 01:23:19 marka Exp $ */
+/* $Id: lex.c,v 1.66.2.3 2001/12/13 06:17:34 bwelling Exp $ */
 
 #include <config.h>
 
@@ -392,8 +392,10 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
            source->at_eof)
        {
                if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 &&
-                   lex->paren_count != 0)
+                   lex->paren_count != 0) {
+                       lex->paren_count = 0;
                        return (ISC_R_UNBALANCED);
+               }
                if ((options & ISC_LEXOPT_EOF) != 0) {
                        tokenp->type = isc_tokentype_eof;
                        return (ISC_R_SUCCESS);
@@ -504,6 +506,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                lex->last_was_eol = ISC_FALSE;
                                if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 &&
                                    lex->paren_count != 0) {
+                                       lex->paren_count = 0;
                                        result = ISC_R_UNBALANCED;
                                        goto done;
                                }