Fix Coverity CID 655966 by checking that `m_sdrPlayThread` is
non-null before calling `setDeviceCenterFrequency()`.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652555 by allocating an extra byte and null-terminating the
message buffer. Guard text extraction when the delimiter is absent to avoid
reading beyond the buffer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652457 by checking that `plutoBox` is non-null before
calling `setFIR()`. Also guard parameter updates and device queries
against a missing PlutoSDR box at the same time.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 655933 by returning from catConnect() when
rig_init() fails, preventing subsequent dereferences of a
null m_rig pointer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652299 by checking the result of
mainCore->getChannel() before passing it to getChannelId().
Skip the channel if the lookup returns nullptr.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652244 by clearing the message table column
indexes instead of the status table column sizes when
reversing APRS message table settings.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652458 by moving the getMagSq() call inside
the m_basebandSource null check, avoiding access to the
baseband source when it is unavailable.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652660 by allocating an extra byte for the
message buffer and null-terminating it after a successful
read. This ensures QString::fromUtf8() does not read beyond
the received message.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652454 by passing m_sinkSampleRate,
m_channelSampleRate, and m_inputFrequencyOffset in the
order expected by applyChannelSettings().
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 657025 by clamping the bin indices returned
by binOf() to the valid FFT range before accessing the
spectrum. This prevents out-of-range indexing when the
calculated bin is negative or exceeds the spectrum bounds.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 655947 by replacing end()[-2] with an
explicit size-based index when extracting the transmitted
checksum. This avoids passing a negative index to the
container access expression.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 652479 by checking whether nprefix reaches
the bit width of iq_t before shifting response[b]. This
avoids undefined behavior from shifting by the type width
or more.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix Coverity CID 649227 by returning early from tick() when
m_datvDemod is null. This prevents subsequent calls such as
audioActive() from dereferencing a null pointer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Use QWheelEvent::position() instead of the deprecated pos()
method on Qt 5.15 and later to eliminate the compiler warning,
while retaining compatibility with older Qt 5 versions.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize metadata and capture pointers to nullptr and the total
sample count to zero, ensuring the worker starts with defined state.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize sample count, duration, sample rate, offset, bit depth,
and capture and annotation counts in SigMFFileMetaInfo.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize decoder block storage, counters, and status flags in
DecoderSlot so each slot starts with defined state.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_deviceIndex to prevent use of an indeterminate
device index before configuration is applied.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the FIFO size and read, served, and write indices in
the default constructor to prevent use of indeterminate state.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
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>
Value-initialize both sample buffers and initialize m_log2Decim
to prevent use of indeterminate member values.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Value-initialize AzAlt and sun right-ascension/declination
structures in update() to prevent use of indeterminate
coordinate values.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize prevAz to avoid using an indeterminate azimuth value
when checking satellite passes through zero degrees.
Identified by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>