• src/uifc/uifc32.c uifcx.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 16:01:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/15a5c95743596ebb666ecbbd
    Modified Files:
    src/uifc/uifc32.c uifcx.c
    Log Message:
    Fix four bugs in uifc library

    uifcx.c + uifc32.c: Fix inverted fseek() check in help() — fseek
    returns 0 on success, so (== 0) break was stopping the help index
    search at the first non-matching entry instead of continuing.

    uifcx.c: Fix stack buffer overflow in uinput() — getstr(str, max)
    could write up to max bytes into a 256-byte stack buffer. Use
    malloc(max + 1) instead.

    uifc32.c: Add bounds check to savnum scan in ulist() — the while
    loop searching for a free sav[] slot had no upper bound, reading
    past the MAX_BUFS-sized array. Cap at MAX_BUFS - 1 and free any
    existing buffer in that slot.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 16:01:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3fa01b6b5b0a6d1da4ff2566
    Modified Files:
    src/uifc/uifc32.c uifcx.c
    Log Message:
    Fix three long-standing bugs in uifc library

    uifc32.c: Fix hardcoded 74 in CIO_KEY_END highlight bar loop —
    should use width to match the identical pattern 10 lines earlier.
    Windows wider than 74 columns had an incomplete highlight bar.

    uifc32.c + uifcx.c: Replace vsprintf with vsnprintf in uprintf()
    to prevent stack buffer overflow when formatted output exceeds
    MAX_COLS bytes.

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