BBS: TELESC.NET.BR Assunto: src/doors/clans-src/src/fight.c ibbs.c mail.c reg.c De: Deuc¨ Data: Thu, 12 Mar 2026 12:11:16 -0700 ----------------------------------------------------------- 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.5n --- mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net ----------------------------------------------------------- [Voltar]