Commit fec1c619 authored by Mark Andrews's avatar Mark Andrews

3380. [bug] named could die if a non-existant master list was

                        referenced in a also-notify. [RT #31004]
parent 27809a2e
3380. [bug] named could die if a non-existant master list was
referenced in a also-notify. [RT #31004]
3379. [bug] isc_interval_zero and isc_time_epoch should be
"const (type)* const". [RT #31069]
......
......@@ -649,14 +649,13 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (isc_sockaddr_getport(&addrs[i]) == 0)
isc_sockaddr_setport(&addrs[i], port);
keys[i] = NULL;
if (!cfg_obj_isstring(key)) {
i++;
i++; /* Increment here so that cleanup on error works. */
if (!cfg_obj_isstring(key))
continue;
}
keys[i] = isc_mem_get(mctx, sizeof(dns_name_t));
if (keys[i] == NULL)
keys[i - 1] = isc_mem_get(mctx, sizeof(dns_name_t));
if (keys[i - 1] == NULL)
goto cleanup;
dns_name_init(keys[i], NULL);
dns_name_init(keys[i - 1], NULL);
keystr = cfg_obj_asstring(key);
isc_buffer_init(&b, keystr, strlen(keystr));
......@@ -667,10 +666,9 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (result != ISC_R_SUCCESS)
goto cleanup;
result = dns_name_dup(dns_fixedname_name(&fname), mctx,
keys[i]);
keys[i - 1]);
if (result != ISC_R_SUCCESS)
goto cleanup;
i++;
}
if (pushed != 0) {
pushed--;
......@@ -726,7 +724,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (addrs != NULL)
isc_mem_put(mctx, addrs, addrcount * sizeof(isc_sockaddr_t));
if (keys != NULL) {
for (j = 0; j <= i; j++) {
for (j = 0; j < i; j++) {
if (keys[j] == NULL)
continue;
if (dns_name_dynamic(keys[j]))
......
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