• src/sbbs3/writemsg.cpp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, November 04, 2024 17:37:33
    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 Monday, December 09, 2024 19:15:31
    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 Tuesday, December 24, 2024 13:33:38
    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 Sunday, March 30, 2025 10:15:36
    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 Monday, March 31, 2025 15:28:25
    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 Tuesday, April 22, 2025 15:25:50
    https://gitlab.synchro.net/main/sbbs/-/commit/d513362bbc8619e98695e333
    Modified Files:
    src/sbbs3/writemsg.cpp
    Log Message:
    If editor doesn't create a file, just return false from sbbs_t::editfile()

    ... don't log any error message.

    This fixes issue #914

    ---
    ■ 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 Monday, March 02, 2026 23:37:52
    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 Wednesday, May 06, 2026 19:41:53
    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>

    ---
    ■ 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 Wednesday, May 06, 2026 22:36:57
    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>

    ---
    ■ 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 Thursday, May 07, 2026 20:26:43
    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>

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