• src/sbbs3/fidopkt.hsrc/sbbs3/pktdump.c sbbsecho.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Nov 29 23:47:34 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/f8bebadf2b9b68147acfce16
    Added Files:
    src/sbbs3/fidopkt.h
    Modified Files:
    src/sbbs3/pktdump.c sbbsecho.c
    Log Message:
    SBBSecho/PktDump: accept packed-message DateTimes that aren't 19 chars + NUL

    FTS-0001 draws the packed message DateTime as a 20-byte field, but Fido
    (and ifmail and CrashMail) read and write it as a NUL-terminated string
    of any length, and some software (CNet 3.0, PyGate 1.0, forwarded as-is
    by HPT) writes 20 characters with no NUL at all. SBBSecho required byte
    20 to be NUL, so either kind was logged as a "Grunged message" and the
    rest of the packet was discarded; PktDump reported the same messages as corrupted.

    A new shared helper, fpkdmsg_timelen() in fidopkt.h, decides how much
    of the 20 bytes read belong to the DateTime:
    - last byte NUL: the standard fixed-length field (unchanged behavior)
    - no NUL: a 20-character DateTime
    - an earlier NUL with non-NUL data after it: a variable-length field,
    so the reader seeks back to the byte after the NUL for toUserName

    Non-standard DateTimes must also look like a date (printable, with a
    month name and a colon), so a corrupted header is still rejected rather
    than imported as a message.

    Against the bad packets on hand, PktDump now parses 63 messages instead
    of 30; the 6 corrupted headers that happen to carry a type of 2 are
    still rejected.

    Fixes #1431

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net