Commit 91efc587 authored by Mark Andrews's avatar Mark Andrews
Browse files

Pass NUL terminated buffer name to cfg_parse_buffer

parent ad030332
......@@ -7779,6 +7779,7 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, isc_buffer_t **text,
const char *zone_config;
size_t zone_config_len;
cfg_obj_t *zoneconf = NULL;
char bufname[DNS_NAME_FORMATSIZE];
REQUIRE(view != NULL);
......@@ -7813,8 +7814,11 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, isc_buffer_t **text,
CHECK(putmem(text, (const void *)zone_config, zone_config_len));
CHECK(putstr(text, ";\n"));
snprintf(bufname, sizeof(bufname), "%.*s", (int)zone_name_len,
result = cfg_parse_buffer(named_g_addparser, *text, zone_name, 0,
result = cfg_parse_buffer(named_g_addparser, *text, bufname, 0,
&cfg_type_addzoneconf, 0, &zoneconf);
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment