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(pcapng): out-of-range if_tzone and if_tsoffset raise raw ValueError, OSError and OverflowError #1340
Found while cross-reviewing #1331, which makes these reachable for the first time by decoding signed fields as signed. Out of scope there.
PCAP-NG if_tzone and if_tsoffset are now decoded as signed, so an out-of-range value reaches datetime rather than being masked into a large positive one. Three raw exceptions escape:
if_tzone of ±24h or more raises a bare ValueError from timezone(timedelta(seconds=...)).
if_tsoffset out of range raises OSError or OverflowError from datetime.fromtimestamp, which the surrounding code catches only ValueError from.
All three should be in-library errors from pcapkit.utilities.exceptions, so a malformed capture reports as a protocol error rather than as an interpreter traceback from datetime.
Blocked on #1331, which owns the signed-decode change.
Unblocked: #1331 merged (2026-10-07T20:41Z). pcapng.py:3063 still calls timezone(timedelta(seconds=schema.tzone)) unguarded on a8cc02594. A worker is on it now, on branch fix/1340-pcapng-tzone-tsoffset.
Activity
JarryShaw commentedon Oct 8, 2026
Unblocked: #1331 merged (2026-10-07T20:41Z).
pcapng.py:3063still callstimezone(timedelta(seconds=schema.tzone))unguarded ona8cc02594. A worker is on it now, on branchfix/1340-pcapng-tzone-tsoffset.fix(pcapng): keep out-of-range if_tzone as captured and catch every f…