mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
explitictly REQUIRE that reqaddr is non-null in dns_acl_match
This commit is contained in:
@@ -139,6 +139,7 @@ dns_acl_match(isc_netaddr_t *reqaddr,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
int indirectmatch;
|
int indirectmatch;
|
||||||
|
|
||||||
|
REQUIRE(reqaddr != NULL);
|
||||||
REQUIRE(matchelt == NULL || *matchelt == NULL);
|
REQUIRE(matchelt == NULL || *matchelt == NULL);
|
||||||
|
|
||||||
for (i = 0; i < acl->length; i++) {
|
for (i = 0; i < acl->length; i++) {
|
||||||
@@ -173,6 +174,7 @@ dns_acl_match(isc_netaddr_t *reqaddr,
|
|||||||
* "no match".
|
* "no match".
|
||||||
* That way, a negated indirect ACL will never become
|
* That way, a negated indirect ACL will never become
|
||||||
* a surprise positive match through double negation.
|
* a surprise positive match through double negation.
|
||||||
|
* XXXDCL this should be documented.
|
||||||
*/
|
*/
|
||||||
if (indirectmatch > 0)
|
if (indirectmatch > 0)
|
||||||
goto matched;
|
goto matched;
|
||||||
|
Reference in New Issue
Block a user