From 603658ea65b34c4b57f154b1e2412b4f01866b6b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Apr 2003 03:26:58 +0000 Subject: [PATCH] 1462. [bug] parse_sizeval() failed to check the token type. [RT #5586] --- CHANGES | 3 +++ lib/isccfg/namedconf.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6b95740f91..1b3f79c2d4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1462. [bug] parse_sizeval() failed to check the token type. + [RT #5586] + 1461. [bug] Remove deadlock from rbtdb code. [RT #5999] 1460. [bug] inet_pton() failed to reject certian malformed diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index a2b9c859ce..874bcf7d27 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: namedconf.c,v 1.20 2003/02/27 05:12:45 marka Exp $ */ +/* $Id: namedconf.c,v 1.21 2003/04/17 03:26:58 marka Exp $ */ #include @@ -928,6 +928,10 @@ parse_sizeval(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { UNUSED(type); CHECK(cfg_gettoken(pctx, 0)); + if (pctx->token.type != isc_tokentype_string) { + result = ISC_R_UNEXPECTEDTOKEN; + goto cleanup; + } CHECK(parse_unitstring(TOKEN_STRING(pctx), &val)); CHECK(cfg_create_obj(pctx, &cfg_type_uint64, &obj));