]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dns_rdata_tostruct() should reject rdata with DNS_RDATA_UPDATE set
authorMark Andrews <marka@isc.org>
Thu, 10 Jun 2021 00:14:17 +0000 (10:14 +1000)
committerMark Andrews <marka@isc.org>
Wed, 21 Jul 2021 02:40:47 +0000 (12:40 +1000)
(cherry picked from commit e97249e01270ab43065e3a7d6ba3f5a36593a2c4)

lib/dns/include/dns/rdata.h
lib/dns/rdata.c

index 9221c8951add809e172972f02c19f829adf56548..359f69d674cca2ed0b50a4136688fc073f454e43 100644 (file)
@@ -516,7 +516,7 @@ dns_rdata_tostruct(const dns_rdata_t *rdata, void *target, isc_mem_t *mctx);
  *
  * Requires:
  *
- *\li  'rdata' is a valid, non-empty rdata.
+ *\li  'rdata' is a valid, non-empty, non-pseudo rdata.
  *
  *\li  'target' to point to a valid pointer for the type and class.
  *
index a2eb404f411c485b9fbc203a1437063b3f66baac..6fb7bc3d22860abbdb72b79ec8aaea4be3be5395 100644 (file)
@@ -1222,6 +1222,7 @@ dns_rdata_tostruct(const dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
 
        REQUIRE(rdata != NULL);
        REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
+       REQUIRE((rdata->flags & DNS_RDATA_UPDATE) == 0);
 
        TOSTRUCTSWITCH