diff --git a/CHANGES b/CHANGES index a50335aa2d..93102bab8d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1227. [bug] dns_lex_getmastertoken() now returns ISC_R_BADNUMBER + if a number was expected and some other token was + found. [RT#2532] + 1226. [func] Use EDNS for zone refresh queries. [RT #2551] 1225. [func] dns_message_setopt() no longer requires that diff --git a/lib/isc/lex.c b/lib/isc/lex.c index d0d7dfb603..1a83b981e9 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.74 2002/02/21 20:04:01 gson Exp $ */ +/* $Id: lex.c,v 1.75 2002/03/11 05:38:27 marka Exp $ */ #include @@ -811,6 +811,8 @@ isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token, if (token->type == isc_tokentype_eol || token->type == isc_tokentype_eof) return (ISC_R_UNEXPECTEDEND); + if (expect == isc_tokentype_number) + return (ISC_R_BADNUMBER); return (ISC_R_UNEXPECTEDTOKEN); } return (ISC_R_SUCCESS);