• src/sbbs3/js_socket.cpp pack_qwk.cpp userdat.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Oct 29 22:22:33 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/90e345693a101a7da0d26b36
    Modified Files:
    src/sbbs3/js_socket.cpp pack_qwk.cpp userdat.c
    Log Message:
    Address Coverity CIDs 661198 and 661301-661304

    js_socket_tls_thread(): the acceptTLS worker's one-byte send() that
    wakes the JS thread went unchecked. Had it failed, the notification
    socket would never become readable and the script's callback would never
    run, since the JS side's reference keeps the other end open. Retry on
    EINTR; on any other failure log it and shut down the write side, so the
    JS thread still wakes on EOF and collects the handshake status.
    (CID 661302)

    The two MISSING_LOCK reports against the same code are annotated, not
    changed: do_js_close() reads the pending handshake's socket on the JS
    thread, the only thread that writes it, and the worker's unlocked use of
    the session precedes the notification after which the JS thread takes it
    over under the mutex. (CIDs 661301, 661304)

    pack_qwk(): remove the empty-index and stale NEWFILES.DAT temp files
    with fremove(), which ignores a missing file and reports any other
    failure, as the QWK job's other removes do. (CID 661198)

    finduserstr_ex(): stop the bulk read if read() reports more than was
    requested, which bounds want - got for the analyzer. (CID 661303)

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

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