https://gitlab.synchro.net/main/sbbs/-/commit/ea89594c92763da3f5540055
Modified Files:
src/sbbs3/email.cpp netmail.cpp writemsg.cpp
Log Message:
Don't store a failed allocation's error code as a message data offset
smb_addmsg() checks the allocator's return value before narrowing it into msg.hdr.offset, but three callers that allocate data storage themselves
did not: email(), the QWK netmail import, and movemsg(). A failed
allocation stored (uint32_t)-120 as the message's data offset, producing
a header pointing ~4GB into the data file. One such message is enough to
break smb_getmsgtxt(), maintenance and pack for the whole base.
issue #1170
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net