• src/sbbs3/js_file.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jun 25 15:20:45 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/c5ad7fc5c635cdc4db13df51
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Add support for reading/writing 8-byte (64-bit) integers in binary files

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Jan 16 20:41:25 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/d797b759823692f607962bf8
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Add File method: iniRemoveSections()

    to remove all sections in an .ini file or all sections with a specified
    prefix.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Tue Mar 14 21:25:14 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/1f86e81c78290852da97a86d
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Fix JSDOC typo

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sun Mar 24 15:41:49 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/fb957d1d8844368b19fb5b16
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Increase size of file mode string so it's not 4 bytes.

    4-bytes is how bit a 32-bit pointer is.

    ---
    ■ 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 Sat May 25 14:28:35 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/7dcfa20fe2f1ce9eb52a3ba1
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Don't convert/store small integers to doubles when reading/writing .ini files

    Fix issue #760

    UINT_TO_JSVAL automatically handles the storage as the necsesary underlying type in the JS engine.

    Values > 0x7fffffff (2147483647) will still be stored (and re-written) as doubles and could be problematic.

    ---
    ■ 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 Fri Sep 13 20:08:11 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/105627890fa49ca6a6198408
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Eliminte weird gcc (12.2) warning in release build (only)

    Increasing size of mode[] element by 2 bytes eliminated these GCC warnings
    that seem like false-positives to me:

    sbbs.h:194:48: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
    194 | (ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \
    | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    js_file.c:225:25: note: in expansion of macro `JSSTRING_TO_STRBUF'
    225 | JSSTRING_TO_STRBUF(cx, str, p->mode, sizeof(p->mode), NULL);
    | ^~~~~~~~~~~~~~~~~~
    js_file.c:42:17: note: at offset 5 into destination object `mode' of size 5
    42 | char mode[5];
    | ^~~~

    Similar use of JSSTRING_TO_STRBUF in other files (js_console.cpp, js_archive.c) (with larger target buffers) does not trigger the same warnings.

    ---
    ■ 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 Sat Sep 21 13:08:41 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/6ba59a06b546c1ed0e3b2b8b
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    Add missing NULL pointer check to js_iniReadAll()

    iniReadFile() can return NULL upon file read error or malloc error. Let's not crash if that happens.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Tue Oct 1 00:11:39 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5e1087e457db2b41dab45deb
    Modified Files:
    src/sbbs3/js_file.c
    Log Message:
    File.read() encodes base64, it doesn't decode.

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