mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Add stricter P25 id checking.
This commit is contained in:
@@ -71,7 +71,7 @@ void CP25Data::encodeHeader(unsigned char* data)
|
||||
CP25Utils::encode(DUMMY_HEADER, data, 114U, 780U);
|
||||
}
|
||||
|
||||
bool CP25Data::decodeLDU1(const unsigned char* data, bool m_network, bool m_uidOverride)
|
||||
bool CP25Data::decodeLDU1(const unsigned char* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
@@ -105,12 +105,7 @@ bool CP25Data::decodeLDU1(const unsigned char* data, bool m_network, bool m_uidO
|
||||
return false;
|
||||
}
|
||||
|
||||
// Simple validation of the source id - does not check if no network
|
||||
unsigned int srcId = (rs[6U] << 16) + (rs[7U] << 8) + rs[8U];
|
||||
if (m_network || (!m_network && !m_uidOverride)) {
|
||||
if (srcId < 1000000U)
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (rs[0U]) {
|
||||
case P25_LCF_GROUP:
|
||||
|
||||
Reference in New Issue
Block a user