• src/sbbs3/scfg/scfg.c scfgchat.c scfgmsg.c scfgnet.c scfgsys.c scfgxtr

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue May 23 20:50:08 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/c772389f204f5834773f554f
    Modified Files:
    src/sbbs3/scfg/scfg.c scfgchat.c scfgmsg.c scfgnet.c scfgsys.c scfgxtrn.c
    Log Message:
    Prevent heap corruption by bounds-checking writes to opt[]Since we are now free()ing the opt[] items in bail(), I've seen heapcorruption core dumps after navigating the SCFG menus with some longconfiguration items (e.g. timed events with max-length command-lines).This heap corruption has been present for a long, long time, but notdetected since we weren't free()ing these heap-allocated items.Increasing MAX_OPLN would have been a mitigation for this issue, butusing snprintf(opt[n],MAX_OPLN,...) is the better fix.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)