• src/sbbs3/js_mqtt.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Feb 11 21:47:47 2024
    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