Closed
Description
Parsing an OPTRecord should not read past the end of the record, however due to the current behaviour of the limit functionality in DNSInput
, this is currently what happens.
EDNSOption.fromWire() calls the sequence DNSInput.saveActive(), DNSInput.setActive(), DNSInput.restoreActive(), which seems straight forward to me. However, when setActive() was previously called higher up in the stack (in Record.newRecord()) .saveActive() does not return value that I would expect, the end of the currently active region, but instead the end of the buffer without the current value of limit on the inner ByteBuffer being considered.
Whether this is wrong or not is unclear to me but clearly the end result is undesirable