Fix other crashes

This commit is contained in:
Andy CA6JAU 2018-08-20 00:47:45 -03:00
parent 713d12e5a4
commit b66a92bb9c
3 changed files with 6 additions and 2 deletions

View File

@ -595,6 +595,10 @@ unsigned int CP25Control::readModem(unsigned char* data)
void CP25Control::writeNetwork()
{
unsigned char data[100U];
if (m_network == NULL)
return;
unsigned int length = m_network->read(data, 100U);
if (length == 0U)
return;

View File

@ -98,7 +98,6 @@ CP25NID::~CP25NID()
delete[] m_term;
delete[] m_tsdu;
delete[] m_pdu;
delete[] m_tsdu;
}
bool CP25NID::decode(const unsigned char* data)

View File

@ -97,7 +97,8 @@ unsigned int CPOCSAGControl::readModem(unsigned char* data)
bool CPOCSAGControl::processData()
{
assert(m_network != NULL);
if (m_network == NULL)
return false;
unsigned char data[300U];
unsigned int length = m_network->read(data);