From d4f36753eda30fce01cc90ca63b5858434b4c7e3 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sun, 2 Aug 2026 19:24:42 -0400 Subject: [PATCH] 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 --- plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp b/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp index dd8e88efe..f4c150754 100644 --- a/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp +++ b/plugins/samplesource/remotetcpinput/remotetcpinputtcphandler.cpp @@ -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;