From fefd6c28ab266a2e0ebe0fe080b505ff09be9315 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 13 Dec 2001 06:17:34 +0000 Subject: [PATCH] 1161. [bug] named-checkzone looped on unbalanced brackets. [RT #2248] --- CHANGES | 3 +++ lib/isc/lex.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index bf77760423..7ee47b0ffa 100644 --- 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] diff --git a/lib/isc/lex.c b/lib/isc/lex.c index 3066a67b2d..c69a52f241 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -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 @@ -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; }