2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Merge branch '3547-dns_message_checksig-leak-fix' into 'main'

Fix memory leak in dns_message_checksig() - SIG(0) sigs

Closes #3547

See merge request isc-projects/bind9!6787
This commit is contained in:
Petr Špaček
2022-09-26 09:55:40 +00:00

View File

@@ -3167,14 +3167,15 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) {
return (ISC_R_UNEXPECTEDEND);
}
result = dns_rdata_tostruct(&rdata, &sig, msg->mctx);
result = dns_rdata_tostruct(&rdata, &sig, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
}
dns_rdataset_init(&keyset);
if (view == NULL) {
return (DNS_R_KEYUNAUTHORIZED);
result = DNS_R_KEYUNAUTHORIZED;
goto freesig;
}
result = dns_view_simplefind(view, &sig.signer,
dns_rdatatype_key /* SIG(0) */, 0,