• src/doors/clans-src/src/fight.c ibbs.c mail.c reg.c

    From Deuc¨@VERT to Git commit to main/sbbs/master on Thu Mar 12 12:11:16 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/637a1f6d0c2575a0eee36e2b
    Modified Files:
    src/doors/clans-src/src/fight.c ibbs.c mail.c reg.c
    Log Message:
    Fix sizeof(pointer) bugs in fight.c, mail.c, reg.c, and ibbs.c

    Found and fixed five sizeof(pointer) bugs where functions using char* parameters were applying sizeof() to those parameters, yielding 8
    (pointer size on 64-bit) instead of the actual buffer size. This caused
    silent truncation of:
    - Item-taken battle messages (fight.c:1671,1676)
    - Quoted reply text and word-wrap overflow (mail.c:410,540,545,1095)
    - Obfuscated registration codes (reg.c:89)

    Fix: Added size_t n parameter to:
    - TakeItemsFromClan() in fight.c Ä pass sizeof(szMessage)=500
    - QInputStr() and InputStr() in mail.c Ä pass sizeof(Line1)=128
    (Note: n applies to both String and NextString buffers, which must be
    equal-sized. Added documentation comments to clarify this constraint.)
    - Jumble() in reg.c Ä pass sizeof(szUserCode)=40 or sizeof(szRealCode)=40

    Also fixed code smell in ibbs.c:3382 where sizeof(szFileName2) was used
    instead of sizeof(szFileName) (both are the same size, but misleading).

    All 588 tests pass with clean build (1 harmless warning: unused szFileName2).

    Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

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