https://gitlab.synchro.net/main/sbbs/-/commit/55eaccec35c18dc552485d8a
Modified Files:
src/sbbs3/getmsg.cpp
Log Message:
getmsg: guard idx.number underflow in getmsgnum (CID 530525)
When smb_getmsgidx_by_time succeeded but returned idx.number == 0
(should not happen for valid messages, but defensively), 'idx.number - 1' underflowed uint32_t and produced 0xFFFFFFFF == ~0, the function's
error sentinel — accidentally correct, but undefined per signed-int
return. Make the zero-number case explicitly return ~0.
Co-Authored-By: Claude Opus 4.7 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net