mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Add additional contraints to dns_rdata_checksvcb
REQUIRE that rdata->type is dns_rdatatype_svcb to detect when dns_rdata_checksvcb is called with the wrong rdata type. There are no code paths that currently pass the wrong rdata to dns_rdata_checksvcb. This was found by GCC 12 static analysis.
This commit is contained in:
@@ -2435,6 +2435,7 @@ dns_rdata_checksvcb(const dns_name_t *owner, const dns_rdata_t *rdata) {
|
||||
|
||||
REQUIRE(owner != NULL);
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_svcb);
|
||||
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
|
||||
|
||||
result = dns_rdata_tostruct(rdata, &svcb, NULL);
|
||||
|
Reference in New Issue
Block a user