BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/websrvr.cpp
De:       Rob Swindell (on Debian Linux)
Data:     Wed, 6 May 2026 22:36:57 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/6ad832522da440e614b8fcdf
Modified Files:
	src/sbbs3/websrvr.cpp
Log Message:
websrvr: clamp tls_sent and explicit cast in sess_sendbuf return (CID 639935)

The TLS path assigns 'result = tls_sent' where tls_sent is int and
could theoretically be negative on cryptlib edge cases. Adding it
to size_t 'sent' would underflow. Guard with 'if (result > 0)'.

Also make the size_t-to-int returns explicit casts so Coverity sees
the narrowing is intentional.

Co-Authored-By: Claude Opus 4.7 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]