• src/xpdev/str_list.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, April 16, 2021 12:22:40
    https://gitlab.synchro.net/main/sbbs/-/commit/bef16f429032791c7f485e54
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    if strListFind() is passed a NULL 'str' value, return -1 (not found)

    Return int value for "string not found" rather than crash/segfault. Seems the better option.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, May 04, 2021 01:12:22
    https://gitlab.synchro.net/main/sbbs/-/commit/30f63a5c271519872f70285e
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    NULL pointer checks in strListSort*() and strListDup()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 21, 2023 13:15:16
    https://gitlab.synchro.net/main/sbbs/-/commit/a5ed96ee9e9ba0a52ad07bc1
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    strListJoin() will now fail gracefully (return NULL) if passed NULL buf

    No immediate need/use.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Saturday, March 25, 2023 18:46:50
    https://gitlab.synchro.net/main/sbbs/-/commit/b869bf8ca721367548be301d
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    Fix strListCmp() - apparently never tested

    This function is used in sbbs_ini.c, but was always returnning non-zero, even when both string lists were identical.

    ---
    þ 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 Saturday, September 21, 2024 13:08:41
    https://gitlab.synchro.net/main/sbbs/-/commit/d49134e6f734b94cc1741418
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    strListReadFile() now returns NULL on any file read failure

    Previously, the partially-read lines would be returned in an allocated
    string list. This is a suspected cause of issue #791: even though the file was successfully opened exclusively (using sopen... SH_DENYRW), it's possible that Samba had already allowed another client or local process to open the same file, but is now a denying read (most likely, the first read). As Deuce
    pointed out, the xpdev *nix implementation of sopen() locks the region/record of the entire file. So before this change, strListReadFile() might fail on
    the first read, and a function that uses iniFileRead() to modify the contents of an ini file, might end up writing back the empty list (with added keys), thus deleting all the existing content of the file.

    Also in this change:
    - Eliminated the unnecessary local/wrapped str_list_read_file() function.
    - Elminate unecessary null-before-free check
    - Fixed potential memory leak upon malloc failure (the potentially-allocated
    list wasn't freed).

    ---
    þ 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 Saturday, March 08, 2025 20:48:41
    https://gitlab.synchro.net/main/sbbs/-/commit/247d1b4c27f22d0e9b4491e6
    Modified Files:
    src/xpdev/str_list.c
    Log Message:
    Detect failure (e.g. realloc failure) in strListReadFile->strListAppend()

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