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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user