Skip to content

Commit

Permalink
Fixes issue #266.
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-NLnetLabs committed Jan 24, 2025
1 parent 310ae27 commit d712ac4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2588,6 +2588,14 @@ ldns_rdf_bitmap_known_rr_types_set(ldns_rdf** rdf, int value)
for (d=rdata_field_descriptors; d < rdata_field_descriptors_end; d++) {
window = d->_type >> 8;
subtype = d->_type & 0xff;

/* In the code below, windows[window] == 0 means that the
* window is not in use. So subtype == 0 is a problem. The
* easiest solution is to set subtype to 1, that marks the
* window as in use and doesn't have negative effects.
*/
if (subtype == 0)
subtype = 1;
if (windows[window] < subtype) {
windows[window] = subtype;
}
Expand Down

0 comments on commit d712ac4

Please sign in to comment.