• JS: console.getstr() causes Synchronet to crash if negative value is p

    From Eric Oulashin@1:103/705 to GitLab issue in main/sbbs on Sun Dec 14 17:16:20 2025
    open https://gitlab.synchro.net/main/sbbs/-/issues/1032

    From the [Synchronet JS object model documentation:](https://www.synchro.net/docs/jsobjs.html)

    console.getstr(\[_string_ default_value\] \[,_number_ maxlen=128\] \[,_number_ k_mode=K_NONE\] \[,_array_ history\[\]\])

    I'm currently using a Linux build from December 8 at 5:04PM (the latest code failed to build). I've noticed I can pass 0 for the 2nd argument (maxlen), but passing a negative value seems to cause Synchronet to crash. For instance:

    ```
    var input = console.getstr("", -1, K_UPPER|K_NOSPIN|K_TRIM);
    ```

    When that line of code ran for me, I was disconnected, and I saw this in the sbbs log output:

    Dec 14 17:05:54 EO-BBS-NIX systemd\[1\]: sbbs.service: Main process exited, code=dumped, status=6/ABRT

    Dec 14 17:05:54 EO-BBS-NIX systemd\[1\]: sbbs.service: Failed with result 'core-dump'.

    Normally I'd update my binaries, but it's failing to build due to the following error:

    make: \*\*\* No rule to make target 'js_archive.c', needed by 'gcc.linux.x64.obj.release-mt/js_archive.o'. Stop.
    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)