1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-05-23 16:46:55 -04:00
Zane (RainCicada) 87e1cabfca sdrsrv: fix null-deref in MainServer::addMIMODevice()
addMIMODevice() never assigned m_deviceSets.back()->m_deviceAPI before
dereferencing it via setSampleMIMO(), causing the very first
POST /sdrangel/deviceset?direction=2 against a fresh headless server
to SIGSEGV in DeviceAPI::setSampleMIMO()'s vtable lookup.

DeviceSet's constructor initializes m_deviceAPI to nullptr
(sdrbase/device/deviceset.cpp:38), and the sibling helpers
addSinkDevice() (line 283) and addSourceDevice() (line 323) both
assign the new DeviceAPI* into m_deviceSets.back()->m_deviceAPI
before any later dereference. addMIMODevice() omits this assignment,
so the line that today reads:

    m_mainCore->m_deviceSets.back()->m_deviceAPI->setSampleMIMO(mimo);

dereferences nullptr.

Fix by performing the same assignment as the Sink/Source paths, just
before the createSampleMIMOPluginInstance() call.

Verified against v7.25.1 in a custom headless build
(cicada-sdrangelsrv:7.25.1-mimo) with a LimeSDR-USB:

  - Pre-patch: POST /sdrangel/deviceset?direction=2 -> HTTP 202,
    then immediate SIGSEGV (backtrace top frame
    DeviceAPI::setSampleMIMO -> MainServer::addMIMODevice).
  - Post-patch: POST -> HTTP 202, container healthy, follow-up
    PUT /sdrangel/deviceset/0/device with hwType=LimeSDR
    direction=2 -> HTTP 202, deviceset reports the LimeSDR
    correctly bound as a MIMO device.
2026-05-21 21:40:04 -05:00
2026-02-13 21:48:27 +01:00
2026-05-05 08:07:51 +02:00
2026-05-05 21:53:03 +02:00
2024-07-10 23:06:38 +02:00
2026-03-15 00:18:52 +01:00
2026-03-25 18:58:43 +00:00
2026-04-22 20:14:10 +01:00
2026-03-27 21:17:46 +01:00
2026-05-20 12:12:25 +02:00
2026-05-17 11:30:05 +01:00
2021-01-29 12:57:58 +00:00
2024-08-03 11:05:12 +02:00
2026-05-05 08:07:51 +02:00
2026-05-04 06:00:17 +02:00
2023-05-02 19:43:59 +02:00
2019-04-11 07:06:30 +02:00
2022-10-29 13:37:09 +02:00

SDR Angel banner

SDRangel is an open-source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.

Wiki: Most of the information and documentation related to SDRangel can be found in the Wiki. Please make sure to check it in case of questions or trouble and before you post issues on GitHub. You may also seek help from other users using the discussion group below. Before running the program, make sure you read at least the Home and Quick Start pages.

Discussion group: You can ask other users for help or discuss subjects related to SDRangel and its ancillary projects here.

Ancillary projects

  • SDRangelcli is a web application that can be used to control a headless (server flavor) instance of SDRangel. It can also be used as a remote control for the GUI flavor.
  • SDRangel-Docker is a collection of Docker files and scripts to facilitate building and running SDRangel in a Docker container. Works for either the GUI (only on a Linux host) or the server.
Languages
C++ 69.4%
JavaScript 28.1%
CMake 0.9%
C 0.6%
Python 0.3%
Other 0.6%