1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 23:43:43 -04:00

remotetcpinput: Avoid using uninitialized converter buffer

Coverity reported that an invalid sample size could leave the
conversion buffer uninitialized before it was passed to calcPower()
and the sample FIFO.

Return early when the sample conversion format is unsupported to
prevent processing invalid data.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-08-02 19:24:42 -04:00
parent 5a02fe67ed
commit d4f36753ed
@@ -2231,6 +2231,7 @@ void RemoteTCPInputTCPHandler::processUncompressedData(const char *inBuf, int nb
else // invalid size
{
qWarning("RemoteTCPInputTCPHandler::convert: unexpected sample size in stream: %d bits", (int) m_settings.m_sampleBits);
return;
}
qint32 len = nbSamples*2;