• src/smblib/smbfile.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tuesday, September 29, 2026 17:07:32
    https://gitlab.synchro.net/main/sbbs/-/commit/662b2f6d1a71988779d94f46
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    smb_removefile(): remove only the file's own index record

    Removing a file dropped every index record whose name matched the file's, ignoring case, not just its own. In a base holding names that differ only
    in case (e.g. a.txt and A.txt), removing either one also dropped the
    other's index record, orphaning its header and data: still active in the
    base, but no longer findable or listed.

    Identify the record by the number in the index record the file was loaded
    from. The header carries the same number, but nothing checks the two agree
    on read, and a header whose number no longer matched would leave the
    file's index record in place, pointing at a header already marked deleted.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ 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 Tuesday, September 29, 2026 17:07:32
    https://gitlab.synchro.net/main/sbbs/-/commit/f11e0cc003d712457ab29917
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    smb_findfile(): prefer an exact-case name match

    A file name lookup returned the first index record matching the name
    while ignoring case. When a base holds names that differ only in case,
    the later of them could never be found by name: FileBase.get(), update(),
    and remove() all reached the earlier file instead, whatever case the
    caller gave.

    Return an exact-case match when there is one, and otherwise the first case-insensitive match as before. A lookup given the stored case still
    stops at the first match; one given a different case now reads the rest
    of the index, as a lookup of a name that isn't there already does.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ 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 Tuesday, September 17, 2024 12:06:15
    https://gitlab.synchro.net/main/sbbs/-/commit/45363fee6f6d688671faeee0
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    NUL-terminate the SMB fileidxrec_t.name field, just in case

    The terminating NUL is actually part of the index record, but with file corruption, it's technically possible the NUL could be missing.
    Fixes CID 509552

    Use strnicmp() insted of stricmp() in smb_removefile()
    Fixes CID 509551

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