]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4189. [cleanup] Don't exit on overly long tokens in named.conf.
authorMark Andrews <marka@isc.org>
Sat, 22 Aug 2015 05:08:22 +0000 (15:08 +1000)
committerMark Andrews <marka@isc.org>
Sat, 22 Aug 2015 05:08:48 +0000 (15:08 +1000)
                        [RT #40418]

(cherry picked from commit 7d0dfa63cf3228b56053815bdf25da7d0e6dc501)

CHANGES
lib/isccfg/parser.c

diff --git a/CHANGES b/CHANGES
index 92ae2e02312bc4611c1f1c133ba896665bc886a0..ff31f422f709129d1d1c7256736872a0677a7d6c 100644 (file)
--- 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]
 
index ebcf482aec4eb6b16ceb49ffbb47f2d02997a993..5d195ae7d2898de776632581bd82081c4c5758ff 100644 (file)
@@ -2482,9 +2482,10 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
                         current_file(pctx), pctx->line);
 
        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;