• src/xpdev/str_list.c

    From rswindell@VERT to CVS commit on Sat Dec 29 13:09:00 2018
    src/xpdev str_list.c 1.49 1.50
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv20463

    Modified Files:
    str_list.c
    Log Message:
    strListFree() will no longer try to dereference the pointer argument if it's NULL.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Feb 8 10:35:00 2019
    src/xpdev str_list.c 1.51 1.52
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv20015

    Modified Files:
    str_list.c
    Log Message:
    Fix Borland C (5.6, not C99 compliant) build issue introduced in previous commit.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Feb 13 20:48:00 2019
    src/xpdev str_list.c 1.52 1.53
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv31705

    Modified Files:
    str_list.c
    Log Message:
    Fix potential for heap corruption in (new function) strListModifyEach():
    If the modify callback function returned a pointer *within* the list item's allocated buffer, the strcpy() would copy from potentialy free'd memory as realloc may change the location of the heap buffer when resizing.
    Fixed by allocating a copy of the returned pointer before freeing the original list item buffer and then just assign the allocated pointer (no copying needed). This likely will result in more heap fragmentation for modified list items are now newly-allocated buffers rather than reallocated existing buffers but the other option would have been to allocate a temporary copy of the string before reallocating and then copying and that would've been a lot more overhead than with this approach.

    This likely fixes any crashes seen in recent revs of v3.17c (e.g. when
    imported QWK or REP packets and text/*.can and the twitlist.cfg are parsed). The sighting on Vertrauen was only in the Windows build and appeared when importing QWK/REP packets.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Mar 20 08:29:53 2020
    src/xpdev str_list.c 1.54 1.55
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv32324

    Modified Files:
    str_list.c
    Log Message:
    The Borland C++/C++Builder (6) that I'm still using doesn't have asprintf() or the necesary functions for a re-implementation of asprintf().


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Apr 22 19:58:43 2020
    src/xpdev str_list.c 1.57 1.58
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv3872

    Modified Files:
    str_list.c
    Log Message:
    Avoid some NULL dereferences when passed NULL str_list_t args.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon May 25 15:46:15 2020
    src/xpdev str_list.c 1.60 1.61
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv16156

    Modified Files:
    str_list.c
    Log Message:
    Fix strListDedupe() - if a string is removed (cause it was a dupe), don't increment the second loop counter or you'll skip past the NULL-terminator.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Apr 16 08:22:40 2021
    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 Mon May 3 21:12:22 2021
    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 Sat Jan 21 13:15:16 2023
    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 Sat Mar 25 18:46:50 2023
    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