You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(sctp): a Host Name parameter without a NUL terminator parses but cannot be rebuilt #1482
Describe the bug
An SCTP Host Name Address parameter (type 11) whose name has no NUL terminator parses, but cannot be rebuilt. The reader accepts the name as captured, while _make_param_hostname requires name.endswith(b'\x00'). This breaks the byte-exact round trip.
The result is the same on main (f1e494884) and on #1481. With #1481, the unpadded form from #1479's repro (...000b0009 6162636465) fails the same way.
Expected behavior from_data(info) and from_data(info.to_dict()) rebuild the captured octets exactly. Rejecting the name at parse would be the other consistent choice. Today parse and rebuild disagree.
System information
Linux, CPython 3.14.7, checkout at f1e494884.
Additional context
On f1e494884, the check is at pcapkit/protocols/transport/sctp.py:2967, in _make_param_hostname (:2945). _read_param_hostname is at :2696. Cutting a multi-chunk packet anywhere after its INIT chunk gives the same failure, as the #1481 review found. #1481's worker found this; it is out of #1481's scope, whose tests use abcd\0.
Activity
fix(sctp): rebuild a Host Name parameter without a NUL terminator as …