Browse Source

samplemimo/limesdrmimo: Initialize output buffer and interpolation

Initialize m_buf to nullptr before allocating the sample buffer
and initialize m_log2Interp to prevent use of indeterminate state.

Identified by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
2893cdf5df
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 4
      plugins/samplemimo/limesdrmimo/limesdrmothread.cpp

4
plugins/samplemimo/limesdrmimo/limesdrmothread.cpp

@ -25,7 +25,9 @@ LimeSDRMOThread::LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, Q @@ -25,7 +25,9 @@ LimeSDRMOThread::LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, Q
m_running(false),
m_stream0(stream0),
m_stream1(stream1),
m_sampleFifo(nullptr)
m_buf(nullptr),
m_sampleFifo(nullptr),
m_log2Interp(0)
{
qDebug("LimeSDRMOThread::LimeSDRMOThread");
m_buf = new qint16[2*DeviceLimeSDR::blockSize*2];

Loading…
Cancel
Save