Describe the bug
misc/pcap/header.py:343-349: when lilendian/bigendian are given, _make_magic returns the microsecond magic whatever nanosecond says. header.py:317 _read_protos(size) ignores size, and nothing calls it.
Reproduction
| Arguments |
Got |
Expected |
(lilendian=True, bigendian=False, nanosecond=True) |
4d3cb2a1 |
nanosecond little-endian magic |
(lilendian=False, bigendian=True, nanosecond=True) |
a1b2c3d4 |
nanosecond big-endian magic |
byteorder='big', nanosecond=True |
a1b23c4d |
a1b23c4d (correct) |
_read_protos with size of 0, 4 or 99 always returns (4, {'lilendian': True}).
Expected behavior
The endian-flag branch honours nanosecond. _read_protos is fixed or removed.
System information
main at b10e7951b, CPython 3.14.7, Linux.
Additional context
Found during the #719 second-round sweep, then reproduced on main.
Describe the bug
misc/pcap/header.py:343-349: whenlilendian/bigendianare given,_make_magicreturns the microsecond magic whatevernanosecondsays.header.py:317_read_protos(size)ignoressize, and nothing calls it.Reproduction
(lilendian=True, bigendian=False, nanosecond=True)4d3cb2a1(lilendian=False, bigendian=True, nanosecond=True)a1b2c3d4byteorder='big', nanosecond=Truea1b23c4da1b23c4d(correct)_read_protoswithsizeof 0, 4 or 99 always returns(4, {'lilendian': True}).Expected behavior
The endian-flag branch honours
nanosecond._read_protosis fixed or removed.System information
mainatb10e7951b, CPython 3.14.7, Linux.Additional context
Found during the #719 second-round sweep, then reproduced on
main.