BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/ssl.c
De:       Rob Swindell (on Debian Linux)
Data:     Thu, 7 May 2026 01:03:39 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/a62f38d5ba9491e2c89227d7
Modified Files:
	src/sbbs3/ssl.c
Log Message:
ssl: fix macOS build of internal_do_cryptInit (CID 483188 follow-up)

e3c1569fc added a _Static_assert that CRYPTLIB_PATCHES is at least
32 chars, but some build configs (macOS, exec/testbuild.js nightly)
define it empty to deliberately skip the patch-version check. The
assert tripped that build.

Replace the assert with a sizeof() runtime guard wrapping the
cryptGetAttributeString / memcmp / asprintf block. Compilers fold
the sizeof comparison constant per build, so:
  - When CRYPTLIB_PATCHES is the real 36-byte literal, the block is
    kept and Coverity sees the memcmp is safely bounded.
  - When CRYPTLIB_PATCHES is "", the block is dropped entirely and
    we never attempt the 32-byte read past the empty literal.

GitLab CI pipelines pass; this only affects the nightly testbuild
configurations that leave CRYPTLIB_PATCHES empty.

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

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