Commit 59498ce1 authored by Mark Andrews's avatar Mark Andrews
Browse files

Quote zone name so that specials are handled

parent 91efc587
...@@ -7802,15 +7802,15 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, isc_buffer_t **text, ...@@ -7802,15 +7802,15 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, isc_buffer_t **text,
INSIST(zone_config != NULL && zone_config_len > 0); INSIST(zone_config != NULL && zone_config_len > 0);
/* zone zonename { config; }; */ /* zone zonename { config; }; */
result = isc_buffer_reserve(text, 5 + zone_name_len + 1 + result = isc_buffer_reserve(text, 6 + zone_name_len + 2 +
zone_config_len + 2); zone_config_len + 2);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
goto cleanup; goto cleanup;
} }
CHECK(putstr(text, "zone ")); CHECK(putstr(text, "zone \""));
CHECK(putmem(text, (const void *)zone_name, zone_name_len)); CHECK(putmem(text, (const void *)zone_name, zone_name_len));
CHECK(putstr(text, " ")); CHECK(putstr(text, "\" "));
CHECK(putmem(text, (const void *)zone_config, zone_config_len)); CHECK(putmem(text, (const void *)zone_config, zone_config_len));
CHECK(putstr(text, ";\n")); CHECK(putstr(text, ";\n"));
......
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