From: Mark Andrews Date: Fri, 19 Apr 2013 02:36:02 +0000 (+1000) Subject: 3551. [bug] resolver.querydscp[46] were uninitialized. [RT #32686] X-Git-Tag: v9.10.0a1~407 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b4914b3d69de3eb57bcf1d6cb3bb8e0b645c1081;p=thirdparty%2Fbind9.git 3551. [bug] resolver.querydscp[46] were uninitialized. [RT #32686] --- diff --git a/CHANGES b/CHANGES index 0e12aa6daa9..eac11209e8b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3551. [bug] resolver.querydscp[46] were uninitialized. [RT #32686] + 3550. [func] Unified the internal and export versions of the BIND libraries, allowing external clients to use the same libraries as BIND. [RT #33131] diff --git a/bin/named/config.c b/bin/named/config.c index 80347902e39..2de1db3786c 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -64,7 +64,6 @@ options {\n\ session-keyalg hmac-sha256;\n\ deallocate-on-exit true;\n\ # directory \n\ - dscp 0;\n\ dump-file \"named_dump.db\";\n\ fake-iquery no;\n\ has-old-clients false;\n\ @@ -903,19 +902,15 @@ ns_config_getport(const cfg_obj_t *config, in_port_t *portp) { isc_result_t ns_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp) { - const cfg_obj_t *maps[2]; const cfg_obj_t *options = NULL; const cfg_obj_t *dscpobj = NULL; isc_result_t result; - int i; (void)cfg_map_get(config, "options", &options); - i = 0; - if (options != NULL) - maps[i++] = options; - maps[i] = NULL; + if (options == NULL) + return (ISC_R_SUCCESS); - result = ns_config_get(maps, "dscp", &dscpobj); + result = cfg_map_get(options, "dscp", &dscpobj); if (result != ISC_R_SUCCESS || dscpobj == NULL) { *dscpp = -1; return (ISC_R_SUCCESS); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 36f46e02ccb..7b7745d2877 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -7776,6 +7776,8 @@ dns_resolver_create(dns_view_t *view, ISC_TF((dispattr & DNS_DISPATCHATTR_EXCLUSIVE) != 0); } + res->querydscp4 = -1; + res->querydscp6 = -1; res->references = 1; res->exiting = ISC_FALSE; res->frozen = ISC_FALSE;