• src/sbbs3/nopen.c pack_qwk.cpp pack_rep.cpp qwkjob.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Oct 26 19:58:26 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0be2817caed2a8f4bf20e8e6
    Modified Files:
    src/sbbs3/nopen.c pack_qwk.cpp pack_rep.cpp qwkjob.cpp
    Log Message:
    Address Coverity CIDs 661075-661079 in QWK packing and fmutex_close()

    pack_qwk(): the external compressor command was built with
    cmdstr(temp_cmd(ex), ..., ex). temp_cmd() adds the compressor's configured
    mode flags to ex, but the order in which function arguments are evaluated
    is unspecified, and GCC evaluates the trailing ex first, so cmdstr() never
    saw those flags. That decides whether a DOSEMU system converts the paths
    on a "native" compressor's command line. Call temp_cmd() first. This dates
    from 65cbf055bb (feed-3-crash, 2025-01-09). (CID 661075)

    fmutex_close(): the EBUSY unlink retry added in 9021d114d2 (buys-3-beats, 2026-10-26) waited up to a second without checking the lock file's
    identity again, so a lock that aged out and was taken over meanwhile
    could be removed from under its new holder. Repeat the stat() and inode comparison before each retry. POSIX has no unlink by descriptor, so the remaining window between the check and the unlink is annotated.
    (CID 661077)

    qwkjob_pack_locked(): remove the staged .qwk.tmp with fremove(), which
    ignores a missing file and reports any other failure through errormsg(),
    as the job's other removes do. After a failed rename the file should
    exist, so every error is reported there; a failure would otherwise leave
    it in data/file with nothing in the log. (CID 661076)

    pack_rep(): fexistcase() is called to correct the file name's case, so
    its result is discarded explicitly. (CID 661079)

    CID 661078 (time_t cast to uint for an elapsed-seconds count) is left
    as is.

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

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