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
Commit 468f9c2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(protocols): refuse an empty raw option in the makers (#2723) (#2728)
A raw-octets item given to a maker had its code read, or was kept, before its
length was checked, so an empty one escaped as a bare exception, was misread,
or was dropped.
- IPv4, HOPOPT, IPv6-Opts: _make_ipv4_options, _make_hopopt_options and
_make_ipv6_opts read schema[0] of b'' and raised IndexError.
- SCTP: _make_sctp_parameters and _make_sctp_causes kept b'', which reached
read() as a schema and raised AttributeError.
- PCAP-NG: _make_pcapng_options and _make_nrb_records read a 16-bit code from
b'' as 0 and wrote an end marker; shorter-than-code octets are refused.
- MH: _make_mh_options, the FID, ANI and LCMP sub-option makers,
_make_qos_attributes and _make_cga_extensions kept b'', which raised
AttributeError alone and was dropped beside another item.
- DCCP, HIP: _make_dccp_options and _make_hip_param dropped b''.
- Each raises ProtocolError in the shape TCP's does since #2708; the makers'
Raises and each released class's 1.6.0 versionchanged say so.
The six new modules fail on 01f0634 without the pcapkit/ change; the
internet, transport, misc, root protocols and project modules pass.
0 commit comments