Merge branch '4432-pointers-dereferenced-before-being-checked-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Pointers Dereferenced before Being Checked" !8508 See merge request isc-projects/bind9!8544
This commit is contained in:
+6
-4
@@ -367,11 +367,12 @@ void
|
||||
dns_dnssecsignstats_increment(dns_stats_t *stats, dns_keytag_t id, uint8_t alg,
|
||||
dnssecsignstats_type_t operation) {
|
||||
uint32_t kval;
|
||||
int num_keys = isc_stats_ncounters(stats->counters) /
|
||||
dnssecsign_block_size;
|
||||
|
||||
REQUIRE(DNS_STATS_VALID(stats) && stats->type == dns_statstype_dnssec);
|
||||
|
||||
int num_keys = isc_stats_ncounters(stats->counters) /
|
||||
dnssecsign_block_size;
|
||||
|
||||
/* Shift algorithm in front of key tag, which is 16 bits */
|
||||
kval = (uint32_t)(alg << 16 | id);
|
||||
|
||||
@@ -414,11 +415,12 @@ dns_dnssecsignstats_increment(dns_stats_t *stats, dns_keytag_t id, uint8_t alg,
|
||||
void
|
||||
dns_dnssecsignstats_clear(dns_stats_t *stats, dns_keytag_t id, uint8_t alg) {
|
||||
uint32_t kval;
|
||||
int num_keys = isc_stats_ncounters(stats->counters) /
|
||||
dnssecsign_block_size;
|
||||
|
||||
REQUIRE(DNS_STATS_VALID(stats) && stats->type == dns_statstype_dnssec);
|
||||
|
||||
int num_keys = isc_stats_ncounters(stats->counters) /
|
||||
dnssecsign_block_size;
|
||||
|
||||
/* Shift algorithm in front of key tag, which is 16 bits */
|
||||
kval = (uint32_t)(alg << 16 | id);
|
||||
|
||||
|
||||
@@ -2493,6 +2493,7 @@ isc_nm_listenhttp(isc_nm_t *mgr, isc_sockaddr_t *iface, int backlog,
|
||||
isc_nmsocket_t *sock = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(VALID_NM(mgr));
|
||||
REQUIRE(!ISC_LIST_EMPTY(eps->handlers));
|
||||
REQUIRE(!ISC_LIST_EMPTY(eps->handler_cbargs));
|
||||
REQUIRE(atomic_load(&eps->in_use) == false);
|
||||
|
||||
@@ -152,9 +152,10 @@ isc_nm_listenudp(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nm_recv_cb_t cb,
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_nmsocket_t *sock = NULL;
|
||||
size_t children_size = 0;
|
||||
REQUIRE(VALID_NM(mgr));
|
||||
uv_os_sock_t fd = -1;
|
||||
|
||||
REQUIRE(VALID_NM(mgr));
|
||||
|
||||
/*
|
||||
* We are creating mgr->nworkers duplicated sockets, one
|
||||
* socket for each worker thread.
|
||||
@@ -693,6 +694,7 @@ isc__nm_udp_send(isc_nmhandle_t *handle, const isc_region_t *region,
|
||||
uint32_t maxudp = atomic_load(&sock->mgr->maxudp);
|
||||
int ntid;
|
||||
|
||||
REQUIRE(VALID_NMSOCK(sock));
|
||||
INSIST(sock->type == isc_nm_udpsocket);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user