aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-15 11:02:41 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-15 11:02:41 +0000
commita291e3dc1c083185ed5588bd04ba27ba0ad27b75 (patch)
treebe15f18fe2aae65a776cd8d47cc7d1fbfc7a1e08 /lib/dvb
parent454fc2dd8591aa9f45545f9c0c667a49a221b285 (diff)
downloadenigma2-a291e3dc1c083185ed5588bd04ba27ba0ad27b75.tar.gz
enigma2-a291e3dc1c083185ed5588bd04ba27ba0ad27b75.zip
fix segfault on transponders with incorrect mjd entries in the TDT
null pointer check before accessing sectionreader object
Diffstat (limited to 'lib/dvb')
-rw-r--r--lib/dvb/dvbtime.cpp3
-rw-r--r--lib/dvb/esection.cpp14
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp
index dff5c0c9..eb0ed692 100644
--- a/lib/dvb/dvbtime.cpp
+++ b/lib/dvb/dvbtime.cpp
@@ -84,7 +84,8 @@ int TDT::createTable(int nr, const __u8 *data, unsigned int max)
if ( length >= 5 )
{
time_t tptime = parseDVBtime(data[3], data[4], data[5], data[6], data[7]);
- eDVBLocalTimeHandler::getInstance()->updateTime(tptime, chan, update_count);
+ if (tptime && tptime != -1)
+ eDVBLocalTimeHandler::getInstance()->updateTime(tptime, chan, update_count);
error=0;
return 1;
}
diff --git a/lib/dvb/esection.cpp b/lib/dvb/esection.cpp
index ae88d100..4758008a 100644
--- a/lib/dvb/esection.cpp
+++ b/lib/dvb/esection.cpp
@@ -23,8 +23,11 @@ void eGTable::sectionRead(const __u8 *d)
{
if (m_timeout)
m_timeout->stop();
- m_reader->stop();
- m_reader=0;
+ if (m_reader)
+ {
+ m_reader->stop();
+ m_reader=0;
+ }
m_sectionRead_conn=0;
ready = 1;
tableReady(error);
@@ -35,8 +38,11 @@ void eGTable::sectionRead(const __u8 *d)
void eGTable::timeout()
{
eDebug("timeout!");
- m_reader->stop();
- m_reader=0;
+ if (m_reader)
+ {
+ m_reader->stop();
+ m_reader=0;
+ }
m_sectionRead_conn=0;
ready = 1;
error = -1;