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

AIS: Validate message length. Fixes #2125

This commit is contained in:
srcejon
2024-06-20 22:00:15 +01:00
parent 0488cc622e
commit 1625c42e38
5 changed files with 24 additions and 13 deletions
+4
View File
@@ -179,6 +179,10 @@ QString AISMessage::typeToString(quint8 type)
AISMessage* AISMessage::decode(const QByteArray ba)
{
if (ba.size() < 1) {
return nullptr;
}
int id = (ba[0] >> 2) & 0x3f;
if ((id == 1) || (id == 2) || (id == 3)) {