• src/sbbs3/writemsg.cpp

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed May 6 19:41:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/a7106cca0cf813beb39710d0
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    writemsg: bail out on ftell error before reusing offset (CID 640333)

    writemsg() captures the message-start offset with ftell() and reuses
    it via three subsequent fseek(stream, l, SEEK_SET) calls. ftell may
    return -1 on error, in which case the fseek calls would seek to a
    negative offset (UB) and corrupt the quoted-text buffer. Bail out
    cleanly instead, mirroring the existing error-cleanup paths.

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed May 6 22:36:57 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/fcffe36822eb49d81f25d7f6
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    writemsg: handle fseek/fexistcase return values (CIDs 486496, 548248)

    - writemsg(): two fexistcase() calls are case-fix-only (same pattern
    as 76b5c7f43); cast to (void).
    - movemsg(): combine fseek+fread error handling so a seek failure
    takes the same error-recovery path as a read failure.

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Thu May 7 20:26:43 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8d91e80d1fc5a8f103574ef8
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    writemsg: change l to long so ftell() error check works (CID 645990)

    l was declared uint, so the (l < 0) check after l = (long)ftell(stream)
    was always false. ftell() returns long and can return -1 on error.
    Update the (ulong) casts on the level_linespermsg comparisons accordingly.

    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)