1161. [bug] named-checkzone looped on unbalanced brackets.

[RT #2248]
This commit is contained in:
Mark Andrews
2001-12-13 06:13:44 +00:00
parent 793711f26e
commit 23fb770906
2 changed files with 8 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lex.c,v 1.71 2001/11/30 01:59:33 gson Exp $ */
/* $Id: lex.c,v 1.72 2001/12/13 06:13:44 marka 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;
}