mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-13 13:27:43 +02:00
- Fix for allocation-failure hardening of rrset cache wildcard
storage and canonical NSEC owner replacement. Thanks to Xin Wang and Jiajia Liu, Northwestern Polytechnical University, for the report.
This commit is contained in:
@@ -1322,10 +1322,11 @@ rrset_canonical(struct regional* region, sldns_buffer* buf,
|
||||
* the non-existence proves. */
|
||||
if(ntohs(k->rk.type) == LDNS_RR_TYPE_NSEC &&
|
||||
section == LDNS_SECTION_AUTHORITY && qstate) {
|
||||
k->rk.dname = regional_alloc_init(qstate->region, can_owner,
|
||||
uint8_t* new_dname = regional_alloc_init(qstate->region, can_owner,
|
||||
can_owner_len);
|
||||
if(!k->rk.dname)
|
||||
if(!new_dname)
|
||||
return 0;
|
||||
k->rk.dname = new_dname;
|
||||
k->rk.dname_len = can_owner_len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user