mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Allow the dns_rdata_in_apl structure to be walked twice
The offset value should be set prior to calculating the length.
This commit is contained in:
parent
e435b0b7fb
commit
f2fd54f4b2
1 changed files with 2 additions and 1 deletions
|
|
@ -331,6 +331,8 @@ dns_rdata_apl_first(dns_rdata_in_apl_t *apl) {
|
|||
return ISC_R_NOMORE;
|
||||
}
|
||||
|
||||
apl->offset = 0;
|
||||
|
||||
/*
|
||||
* Sanity check data.
|
||||
*/
|
||||
|
|
@ -338,7 +340,6 @@ dns_rdata_apl_first(dns_rdata_in_apl_t *apl) {
|
|||
length = apl->apl[apl->offset + 3] & 0x7f;
|
||||
INSIST(4 + length <= apl->apl_len);
|
||||
|
||||
apl->offset = 0;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue