Ticket #13467: ticket13467-stop-dsmcc-crash.patch

File ticket13467-stop-dsmcc-crash.patch, 749 bytes (added by Stuart Auchterlonie, 5 months ago)
  • mythtv/libs/libmythtv/dsmccobjcarousel.cpp

    old new unsigned char *DSMCCCacheModuleData::Add 
    104104    for (size_t i = 0; i < m_blocks.size(); i++)
    105105    {
    106106        QByteArray *block = m_blocks[i];
     107        if (block == nullptr)
     108        {
     109            LOG(VB_DSMCC, LOG_INFO,
     110                QString("[dsmcc] Null data found, aborting reconstruction"));
     111            free(tmp_data);
     112            return nullptr;
     113        }
    107114        m_blocks[i] = nullptr;
    108115        uint size = block->size();
    109116        memcpy(tmp_data + curp, block->data(), size);