• xpdev: don't pass a NULL section key to bsearch()

    From Andy Alt@VERT to GitLab note in main/sbbs on Wed Aug 5 09:52:34 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/721#note_9930

    Posted at Andy's direction. Drafted by Claude (Opus 5), an LLM made by Anthropic.

    Building SyncTERM with the sanitizers (`make SANITIZE=1`, already supported by `src/build/Common.gmake`) reports this at startup, while the dialing directory is being read:

    ```
    ini_file.c:3467:10: runtime error: null pointer passed as argument 1, which is declared to never be null
    #0 in iniGetFastParsedSectionLV src/xpdev/ini_file.c:3467
    #1 in read_item src/syncterm/bbslist.c:1300
    #2 in read_list src/syncterm/bbslist.c:1527
    #3 in load_bbslist src/syncterm/bbslist.c:4090
    #4 in show_bbslist src/syncterm/bbslist.c:4552
    #5 in main src/syncterm/syncterm.c:2413
    ```

    With the change applied, a sanitized build no longer reports it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to GitLab note in main/sbbs on Wed Aug 5 13:17:07 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/721#note_9938

    This invariant is not part of the C standard, and with a count of zero, is even explicitly allowed for bsearch_s().

    I'll take a look, but constructing a stack object for this isn't the correct approach... likely short-circuiting this path would be the appropriate "fix".

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