Skip to content

fix(pcapng): out-of-range if_tzone and if_tsoffset raise raw ValueError, OSError and OverflowError #1340

Closed

Description

@JarryShaw

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:

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.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 7, 2026
  2. JarryShaw commented on Oct 8, 2026

    @JarryShaw
    OwnerAuthor

    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.

  3. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 8, 2026
  4. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 8, 2026
  5. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions