From 7d0dfa63cf3228b56053815bdf25da7d0e6dc501 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 22 Aug 2015 15:08:22 +1000 Subject: [PATCH] 4189. [cleanup] Don't exit on overly long tokens in named.conf. [RT #40418] --- CHANGES | 3 +++ lib/isccfg/parser.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index cc7c1a656d..1341b949b9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4189. [cleanup] Don't exit on overly long tokens in named.conf. + [RT #40418] + 4188. [bug] Support HTTP/1.0 client properly on the statistics channel. [RT #40261] diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index c4d5e26359..d4167d72d7 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -2547,9 +2547,10 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning, snprintf(where, sizeof(where), "%s: ", pctx->buf_name); len = vsnprintf(message, sizeof(message), format, args); +#define ELIPSIS " ... " if (len >= sizeof(message)) - FATAL_ERROR(__FILE__, __LINE__, - "error message would overflow"); + strcpy(message + sizeof(message) - sizeof(ELIPSIS) - 1, + ELIPSIS); if ((flags & (CFG_LOG_NEAR|CFG_LOG_BEFORE|CFG_LOG_NOPREP)) != 0) { isc_region_t r;