f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.87k stars 434 forks source link

Fix heap-use-after-free #2141

Closed dforsi closed 3 weeks ago

dforsi commented 3 months ago

This PR fixes issue #2059 but breaks the device pulldown because when changing the current device it doesn't add the new one.

AddressSanitizer: heap-use-after-free /home/sdrangel/sdrbase/audio/audiofifo.cpp:80 in AudioFifo::write(unsigned char const*, unsigned int) AddressSanitizer: heap-use-after-free /home/sdrangel/sdrbase/audio/audiofifo.h:49 in AudioFifo::fill() const

I tested the audio input with my radio and a websdr and the audio output only with the loudspeakers.

github-actions[bot] commented 2 months ago

This PR is going to be closed due to inactivity

dforsi commented 2 months ago

Steps to reproduce the heap-use-after-free in AudioFifo::write:79:

  1. compile Sdrangel with Address Sanitizer
  2. start Sdrangel with an empty configuration
  3. add an Audio Input source
  4. close Sdrangel

Steps to reproduce the heap-use-after-free in AudioFifo::fill:49:

  1. compile Sdrangel with Address Sanitizer
  2. start Sdrangel with an empty configuration
  3. add an Audio Output sink
  4. close Sdrangel
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 1 month ago

This PR is going to be closed due to inactivity