add a REQUIRE to catch the NULL pointer dereference that triggered CVE-2017-3135

(cherry picked from commit 1d8995d226)
This commit is contained in:
Mark Andrews 2017-01-31 11:20:03 +11:00
parent fb8d8cfc2c
commit 8da7fa7b52

View file

@ -337,6 +337,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
*/
REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(rdataset->methods != NULL);
REQUIRE(countp != NULL);
REQUIRE((order == NULL) == (order_arg == NULL));
REQUIRE(cctx != NULL && cctx->mctx != NULL);