1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-05-23 16:46:55 -04:00

28 Commits

Author SHA1 Message Date
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
srcejon
9afab2af89 Server: Use Sink/MIMO signals rather than Source. 2024-11-01 16:32:39 +00:00
f4exb
bd67d553ea Main server: wait for set sample source/sink/MIMO to complete before loading the device settings. For #2294 2024-11-01 10:32:39 +01:00
f4exb
b85419c56a Sonar fixes 2024-08-27 09:54:09 +02:00
f4exb
aca4a53513 Fixed threading model for DSPDeviceSinkEngine plus other fixes. Part of #2159 2024-08-27 09:54:09 +02:00
f4exb
290023183c Fixed threading model for DSPDeviceMIMOEngine plus other fixes. Part of #2159 2024-08-27 09:54:09 +02:00
f4exb
d2066495a9 Fixed threading model for DSPDeviceSourceEngine. Part of #2159 2024-08-27 09:54:09 +02:00
Daniele Forsi
4241f01376 Fix typos in cpp files 2024-07-10 23:06:38 +02:00
mxi-box
aeafe51220 Fix not remove source buddy 2024-02-27 07:13:09 +08:00
f4exb
b120f9cb01 Rewriting of copyright notices for all but plugins (done), sdrbase, sdrgui. Part of #1893 2023-11-19 13:43:10 +01:00
f4exb
3880a0f98f AMBE feature: cleanup of main application AMBE support 2022-05-25 00:13:40 +02:00
f4exb
7a8cab7879 Fixed missing bits in API. Fixes #1247 2022-05-16 20:51:15 +02:00
f4exb
5860a830f2 MainServer: fix adding unique featureset 2022-05-15 22:17:10 +02:00
f4exb
1bcecec103 v7: added API for configurations and updated presets API. Implements #1234 2022-05-08 19:33:10 +02:00
f4exb
89196c40b2 Massive UI revamping (v7): Make soapy SDR support optional. Fixes #718 2022-04-30 12:52:25 +02:00
f4exb
ec7a10e662 Massive UI revamping (v7): removed --mimo option and added --scrach option. Fixes #1201 2022-04-14 03:49:32 +02:00
f4exb
8a3f15ba45 Moved device and feature sets add and remove signals where appropriate. Improves #1139 2022-03-23 05:53:12 +01:00
f4exb
8477641bec MainCore: signals to notify changes in devices channels and features. Part of #1139 2022-03-12 05:45:24 +01:00
f4exb
e2286cc741 API: /sdrangel/featureset (POST, DELETE) fully implemented 2021-08-21 20:09:57 +02:00
f4exb
55eb6cc951 Fixed -Wunused-parameter warnings 2020-11-14 11:13:32 +01:00
f4exb
65587d43b1 Fixed Websocket spectrum: server implementation 2020-11-12 01:22:48 +01:00
f4exb
25acf953a7 MIMO activation in Main Server 2020-11-10 12:15:19 +01:00
f4exb
48ed11331a MainCore: methods to get channel API and feature 2020-10-13 08:46:43 +02:00
f4exb
2b2ffce469 Unique WebAPIAdapter 2020-10-11 12:39:30 +02:00
f4exb
c9e0425616 Implement MainCore in MainWindow step3: device sets: fixes 2020-10-11 09:36:27 +02:00
f4exb
85014cc74b MainServer fixes 2020-10-11 08:31:05 +02:00
f4exb
5f2e251629 Create a MainCore singleton and renamed MainCore to MainServer 2020-10-10 03:20:42 +02:00
f4exb
d3ce9d49d0 Renamed MainCore to MainServer 2020-10-10 03:20:42 +02:00