From 2c791b16ad01bb7885d8d7f4b69bc68b2c552842 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 31 Jul 2026 14:42:02 +0100 Subject: [PATCH] Check received CRC bytes, to avoid out of range access. --- plugins/channelrx/demodais/aisdemodsink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/channelrx/demodais/aisdemodsink.cpp b/plugins/channelrx/demodais/aisdemodsink.cpp index 92a8c6b2b..c3f685ee6 100644 --- a/plugins/channelrx/demodais/aisdemodsink.cpp +++ b/plugins/channelrx/demodais/aisdemodsink.cpp @@ -242,7 +242,7 @@ void AISDemodSink::processOneSample(Complex &ci) else if (onesCount == 6) { // Start/end of packet - if (gotSOP && (bitCount == 8) && (bits == 0x7e) && (byteCount > 0)) + if (gotSOP && (bitCount == 8) && (bits == 0x7e) && (byteCount >= 3)) { // End of packet // Check CRC is valid