mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-06 06:53:42 +00:00
Add stricter P25 id checking.
This commit is contained in:
parent
23ce9c7b46
commit
afe38bcb9d
5 changed files with 28 additions and 24 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue