Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Majorities, of course, start with minorities. -- Robert Moses


dovenet / Synchronet Programming / src/sbbs3/js_mqtt.c

SubjectAuthor
o src/sbbs3/js_mqtt.cRob Swindell (on Windows 11)

1
src/sbbs3/js_mqtt.c

<65C9B103.48810.syncprog@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=2829&group=DOVE-Net.Synchronet_Programming#2829

  copy link   Newsgroups: DOVE-Net.Synchronet_Programming
From: rob.swindell.(on.windows.11)@VERT (Rob Swindell (on Windows 11))
To: Git commit to main/sbbs/master
Subject: src/sbbs3/js_mqtt.c
Message-ID: <65C9B103.48810.syncprog@vert.synchro.net>
Date: Sun, 11 Feb 2024 21:47:47 -0800
X-Comment-To: Git commit to main/sbbs/master
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Programming
X-FTN-PID: Synchronet 3.20a-Linux master/61a116a10 Feb 10 2024 GCC 12.2.0
X-FTN-MSGID: 48810.syncprog@1:103/705 2a2fa5ad
X-FTN-CHRS: CP437 2
WhenImported: 20240211214747-0800 41e0
WhenExported: 20240211214817-0800 41e0
ExportedFrom: VERT syncprog 48810
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Rob Swindell (on Win - Mon, 12 Feb 2024 05:47 UTC

https://gitlab.synchro.net/main/sbbs/-/commit/3a389c0ca6d2b8db6ce07a2b
Modified Files:
src/sbbs3/js_mqtt.c
Log Message:
Fix heap corruption in Windows builds

This bug caused crashes in the Windows build of sbbs when using the ;spy
sysop command with MQTT enabled.

Memory that is allocated in one DLL (e.g. sbbs.dll) must be freed in that same
DLL (e.g. sbbs.dll, not mosquitto.dll).

mosquitto_message_free() here frees the msg pointer, but we didn't allocate
it in mosquitto.dll in the first place, so that's wrong. The proper mosquitto
function to use in this case is mosquitto_message_free_contents().

---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor