mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
Quote zone name so that specials are handled
This commit is contained in:
parent
91efc587b2
commit
59498ce17f
@ -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);
|
||||
|
||||
/* 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);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
CHECK(putstr(text, "zone "));
|
||||
CHECK(putstr(text, "zone \""));
|
||||
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(putstr(text, ";\n"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user