diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-10 16:52:01 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-10 16:52:01 +0100 |
commit | 43ca916c20a72c9b47a15c460cced63b5c19c286 (patch) | |
tree | a3bdc3d251f8f3e2c3dd301cab45f26423ad4bdc | |
parent | 0a62be0274a0c536b2d32e3d24e321efb385b26c (diff) | |
download | vdr-43ca916c20a72c9b47a15c460cced63b5c19c286.tar.gz vdr-43ca916c20a72c9b47a15c460cced63b5c19c286.tar.bz2 |
Fixed a possible NULL pointer access in cEITScanner::Process()
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | eitscan.c | 24 |
3 files changed, 16 insertions, 11 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8ffa6c2e..9b21c586 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -586,6 +586,7 @@ Andreas Kool <akool@akool.de> for reporting a problem with empty values in setup.conf for fixing detecting the /dev/videoN devices for GRAB in case there are others before the DVB devices + for fixing a possible NULL pointer access in cEITScanner::Process() Guy Roussin <guy.roussin@teledetection.fr> for suggesting not to display channel group delimiters without text @@ -2564,3 +2564,5 @@ Video Disk Recorder Revision History to Marcel Wiesweg). - In case of incomplete sections an error message is now logged only every 10 seconds. +- Fixed a possible NULL pointer access in cEITScanner::Process() (thanks to + Andreas Kool). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: eitscan.c 1.16 2004/01/05 09:51:25 kls Exp $ + * $Id: eitscan.c 1.17 2004/01/10 16:50:51 kls Exp $ */ #include "eitscan.h" @@ -116,16 +116,18 @@ void cEITScanner::Process(void) if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) { if (!(Device->Receiving(true) || Device->Replaying())) { cChannel *Channel = ScanData->GetChannel(); - //XXX if (Device->ProvidesTransponder(Channel)) { - if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin - if (Device == cDevice::PrimaryDevice() && !currentChannel) - currentChannel = Device->CurrentChannel(); - currentDevice = Device;//XXX see also dvbdevice.c!!! - Device->SwitchChannel(Channel, false); - currentDevice = NULL; - scanList->Del(ScanData); - ScanData = NULL; - AnyDeviceSwitched = true; + if (Channel) { + //XXX if (Device->ProvidesTransponder(Channel)) { + if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin + if (Device == cDevice::PrimaryDevice() && !currentChannel) + currentChannel = Device->CurrentChannel(); + currentDevice = Device;//XXX see also dvbdevice.c!!! + Device->SwitchChannel(Channel, false); + currentDevice = NULL; + scanList->Del(ScanData); + ScanData = NULL; + AnyDeviceSwitched = true; + } } } } |