• src/sbbs3/writemsg.cpp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Sep 21 13:08:41 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/10beb091cd05d255e3911a80
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Log a file "create" error if process_edited_file() returns a negative value

    I discovered that sbbs_t::editfile() (exposed as JS console.editfile) just silently failed if it couldn't write to the destination file
    (e.g. permission denied by OS).
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Nov 4 17:37:33 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/e3f17e6411aba06d9894b169
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Internal message/line editor improvements

    * Allow left and right arrow keys to move between lines (within reason)
    * Use the K_USEOFFSET getstr() mode flag to keep cursor position when moving
    between lines with arrow keys
    * Be smart about integer padding when /Listing lines with numbers
    * Add range checking (!) and better error reporting for /Lx argument value
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Dec 9 19:15:31 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/fbe51f3eec27287c29f058a1
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Fix off-by-one usage of snprintf() when copying message subject

    - when converting from CP437 to UTF-8
    - when reading from RESULT.ED drop file

    This effectively limited message subjects in some instances to 69 chars
    instead of 70. This bug was caught while debugging a replied-message subject conversion from UTF-8 to CP437 issue reported by Accession.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tue Dec 24 13:33:38 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/51cb7273a3a6d6c14e64e07f
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Close file descriptor in error condition

    Fix CID 516461
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Mar 30 10:15:36 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9c3a122c0a6fa522d91807c4
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Fix another Coverity defect
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Mar 31 15:28:25 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7a7caa110f6693d15ee2e611
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Fix MSVC warning about signed/unsigned comparison
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Mar 2 23:37:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9abbcf31c3e92cc111f9189c
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    Display changed attributes in change msg attribute function

    This appears to have been broken since commit 556225fa7 (4 years ago, addressing a Coverity complaint <sigh>).

    When changing (toggling) the attributes of a message, the new/changed attributes were supposed to be shown, but were not. Exiting did save those attributes correctly, but the UI was very non-intuitive because of this bug. ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT 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 <[email protected]>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT 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 <[email protected]>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT 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 <[email protected]>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net