4189. [cleanup] Don't exit on overly long tokens in named.conf.
[RT #40418]
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user