mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Fix heap-use-after-free
Fixes issue #2059 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
This commit is contained in:
parent
ac00e5b46b
commit
efd98785cf
@ -218,7 +218,6 @@ void AudioOutput::applySettings(const AudioOutputSettings& settings, const QList
|
|||||||
m_audioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_deviceName);
|
m_audioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_deviceName);
|
||||||
//qDebug("AMDemod::applySettings: audioDeviceName: %s audioDeviceIndex: %d", qPrintable(settings.m_audioDeviceName), audioDeviceIndex);
|
//qDebug("AMDemod::applySettings: audioDeviceName: %s audioDeviceIndex: %d", qPrintable(settings.m_audioDeviceName), audioDeviceIndex);
|
||||||
audioDeviceManager->removeAudioSink(&m_audioFifo);
|
audioDeviceManager->removeAudioSink(&m_audioFifo);
|
||||||
audioDeviceManager->addAudioSink(&m_audioFifo, getInputMessageQueue(), m_audioDeviceIndex);
|
|
||||||
m_sampleRate = audioDeviceManager->getOutputSampleRate(m_audioDeviceIndex);
|
m_sampleRate = audioDeviceManager->getOutputSampleRate(m_audioDeviceIndex);
|
||||||
forwardChange = true;
|
forwardChange = true;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,6 @@ void AudioInput::applySettings(const AudioInputSettings& settings, QList<QString
|
|||||||
}
|
}
|
||||||
|
|
||||||
audioDeviceManager->removeAudioSource(&m_fifo);
|
audioDeviceManager->removeAudioSource(&m_fifo);
|
||||||
audioDeviceManager->addAudioSource(&m_fifo, getInputMessageQueue(), m_audioDeviceIndex);
|
|
||||||
m_sampleRate = audioDeviceManager->getInputSampleRate(m_audioDeviceIndex);
|
m_sampleRate = audioDeviceManager->getInputSampleRate(m_audioDeviceIndex);
|
||||||
qDebug("AudioInput::applySettings: audioDeviceName: %s audioDeviceIndex: %d sampleRate: %d",
|
qDebug("AudioInput::applySettings: audioDeviceName: %s audioDeviceIndex: %d sampleRate: %d",
|
||||||
qPrintable(settings.m_deviceName), m_audioDeviceIndex, m_sampleRate);
|
qPrintable(settings.m_deviceName), m_audioDeviceIndex, m_sampleRate);
|
||||||
|
Loading…
Reference in New Issue
Block a user