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

Check received CRC bytes, to avoid out of range access.

This commit is contained in:
Jon Beniston
2026-07-31 14:42:02 +01:00
parent c44ab1f852
commit 2c791b16ad
+1 -1
View File
@@ -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