Skip to content

tcp: Throw exception instead of ASSERT for unknown PDU length

If a subdissector requests one more segment for a PDU of unknown length, but we can't do reassembly for whatever reason, that's not necesarily a dissector bug (while it could be the result of a bad heuristic, it can happen from a checksum failing validation or reassembly preferences disabled.)

The correct error is a FragmentBoundsError (dissector requested bytes that it couldn't get due to not being reassembled), which is what we would also throw if the returned PDU length were greater than the tvb length instead of unknown. Fix #16689 (closed).

(cherry picked from commit b5989bad)

Merge request reports