mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-21 01:50:07 -04:00
lib/dns/sdb.c: Fix invalid order of DbC checks that could cause dereference before NULL check
This commit is contained in:
parent
9f75d17e95
commit
9ffcc8f165
1 changed files with 3 additions and 2 deletions
|
|
@ -1136,10 +1136,11 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
|||
{
|
||||
dns_sdb_t *sdb = (dns_sdb_t *)db;
|
||||
sdb_dbiterator_t *sdbiter;
|
||||
dns_sdbimplementation_t *imp = sdb->implementation;
|
||||
dns_sdbimplementation_t *imp;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(VALID_SDB(sdb));
|
||||
imp = sdb->implementation;
|
||||
|
||||
if (imp->methods->allnodes == NULL)
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
|
|
@ -1188,7 +1189,7 @@ findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
dns_rdatalist_t *list;
|
||||
dns_sdbnode_t *sdbnode = (dns_sdbnode_t *)node;
|
||||
|
||||
REQUIRE(VALID_SDBNODE(node));
|
||||
REQUIRE(VALID_SDBNODE(sdbnode));
|
||||
|
||||
UNUSED(db);
|
||||
UNUSED(version);
|
||||
|
|
|
|||
Loading…
Reference in a new issue