• src/conio/cterm.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, November 02, 2024 14:02:08
    https://gitlab.synchro.net/main/sbbs/-/commit/e8c6145d3d975d6157ec772d
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Implement line editing support.

    Changing "stuff" on a line will now propogate to the right
    appropriately.

    Next up is double-height characters... hopefully.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, November 03, 2024 10:45:58
    https://gitlab.synchro.net/main/sbbs/-/commit/252e539cc03a4411e4b52897
    Modified Files:
    src/conio/cterm.c
    Log Message:
    "Handle" malloc() failures

    Just scream on stderr, and screw things up in the window.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, November 03, 2024 22:42:40
    https://gitlab.synchro.net/main/sbbs/-/commit/76bf7cde63a9a19dfdb75034
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Make the default Prestel ID 0 bytes long.

    CCl4 sends an ENQ character in the login screen, and sends an ENQ
    which will auto-fill your username. Also, if you enter six zeros
    into the username, it will take you to the password field.

    With ten zeros, this means it's impossible to log in to CCl4.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, November 27, 2024 05:28:48
    https://gitlab.synchro.net/main/sbbs/-/commit/9ab3cfcb1eb84576fe44740f
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Fix up the Prestel "Engineering Test Page" rendering

    This was due to two main bugs... the simple one was a type where
    the cutoff between separated and contiguous mosaics was incorrect,
    which caused the first four separated mosaics to not be displayed.

    The second was due to a number of bugs in the Hold Mosaic
    implementation.

    This fixes the first half of issue 172.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, November 27, 2024 09:34:34
    https://gitlab.synchro.net/main/sbbs/-/commit/548763fda45f0d0db2bda11b
    Modified Files:
    src/conio/cterm.c
    Log Message:
    The final fixings for issue 172

    Use 0 for "no held mosaic" to avoid confusion around printable bytes.
    Store the state of the current cell *before* updating in fix_line()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, December 28, 2024 22:19:59
    https://gitlab.synchro.net/main/sbbs/-/commit/348f1a7e91c6fbab5b81c9e9
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Bump the CTerm revision.

    Commands are added.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, January 03, 2025 09:59:49
    https://gitlab.synchro.net/main/sbbs/-/commit/110f23bfdda7e6f7c96f8f1c
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Add some paranoia around size of macros.

    Initially set 1MB as the max macro size. I can't imagine wanting
    one bigger than this, but I can bump it up if needed.

    This likely fixes a vulerability where the BBS could at least crash
    SyncTERM, and at most take control of the users system. This
    likely isn't the only place that needs bounds checks like this.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 04, 2025 21:51:35
    https://gitlab.synchro.net/main/sbbs/-/commit/c08f1613744351338e822c30
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Fix NULL dereference in strbuf error

    If strbuf is over 5MB, or the realloc() fails, clear strbuf and
    break before writing to strbuf.
    Found by scan-build

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 04, 2025 21:51:35
    https://gitlab.synchro.net/main/sbbs/-/commit/0b61127f46337d568bba8560
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Set defaults for XTerm graphics query before checking

    Fixes potential read of uninitialized data.
    Found by scan-build

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 04, 2025 21:51:35
    https://gitlab.synchro.net/main/sbbs/-/commit/72b1a6ed7da07e08e677c471
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Avoid read out of bounds in bad CSI m

    In the CSI 38 : 2 : Z? : R : G : B m variant, if there was no
    sub params (ie: CSI 38 : m), a read out of bounds would be
    triggered.
    Found by scan-build

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 04, 2025 21:51:35
    https://gitlab.synchro.net/main/sbbs/-/commit/dc75bc36a58f294681a71856
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Handle malicious sequences with 2147483648 parameters.

    Previously, this could (but likely wouldn't) result in accesses
    outside of allocated memory, doing Very Bad Things.
    Found by scan-build

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 04, 2025 22:39:55
    https://gitlab.synchro.net/main/sbbs/-/commit/5ff8b9fe668544911d33451b
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Another NULL dereference after overrunning the string buf.

    Found by scan-build

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Saturday, January 11, 2025 00:01:13
    https://gitlab.synchro.net/main/sbbs/-/commit/9f6780d23478b6cb933d4949
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Get strncat() and strnlen() out of the hot path...

    Down to 4.7s now... 38¨ faster.
    Starting to get somewhere useful now.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, January 11, 2025 00:25:01
    https://gitlab.synchro.net/main/sbbs/-/commit/d308ae450e792921290484a5
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Get strspn() out of the ANSI hot path.

    This was the only standout issue when profiling the ANSI parsing
    code, and is a trivial fix since we're pretty much only checking
    contiguous ranges of characters.

    Unfortunately, I didn't create a test for comparison here.

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