https://gitlab.synchro.net/main/sbbs/-/commit/395e476df88441bb1b782c37
Modified Files:
src/sbbs3/js_cryptcert.cpp
Log Message:
CryptCert: fix double free when the constructor fails to import a cert
When cryptImportCert() or cryptCreateCert() failed, the constructor freed
its private data but left it attached to the object, so the finalizer
freed it again: "new CryptCert('abc')" aborted the process with a glibc double-free when the object was collected. Detach the data before freeing
it.
Also start the private data's cert handle as CRYPT_UNUSED, so the other early-error paths don't make the finalizer destroy handle 0.
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net