summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY5
-rw-r--r--config.h10
-rw-r--r--eit.c6
-rw-r--r--libsi/si.c9
-rw-r--r--libsi/si.h4
6 files changed, 21 insertions, 14 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 64edccc1..d25dcc26 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2909,6 +2909,7 @@ Lars Hanisch <dvb@flensrocker.de>
for fixing learning keyboard remote control codes
for making VDR read command line options from *.conf files in /etc/vdr/conf.d
for adding a missing backslash to the help text of the SVDRP command MOVR
+ for fixing a memory leak in case of broken Extended Event Descriptors
Alex Lasnier <alex@fepg.org>
for adding tuning support for ATSC devices
diff --git a/HISTORY b/HISTORY
index 2e8be678..3e2a75fb 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8452,3 +8452,8 @@ Video Disk Recorder Revision History
- The function cDvbPlayer::Goto() now automatically calls Play() if Still is false.
- Added support for LCN (Logical Channel Numbers), which plugins may use to sort
channels (thanks to Rolf Ahrenberg).
+
+2015-02-01: Version 2.1.9
+
+- Fixed a memory leak in case of broken Extended Event Descriptors (thanks to Lars
+ Hanisch).
diff --git a/config.h b/config.h
index 6eeda2cc..4ce08c90 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 3.13 2015/01/27 10:50:11 kls Exp $
+ * $Id: config.h 3.14 2015/02/01 14:59:52 kls Exp $
*/
#ifndef __CONFIG_H
@@ -22,13 +22,13 @@
// VDR's own version number:
-#define VDRVERSION "2.1.8"
-#define VDRVERSNUM 20108 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "2.1.9"
+#define VDRVERSNUM 20109 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
-#define APIVERSION "2.1.8"
-#define APIVERSNUM 20108 // Version * 10000 + Major * 100 + Minor
+#define APIVERSION "2.1.9"
+#define APIVERSNUM 20109 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
diff --git a/eit.c b/eit.c
index 30c017b5..1f960bb2 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 3.5 2014/02/08 14:20:27 kls Exp $
+ * $Id: eit.c 3.6 2015/02/01 14:55:27 kls Exp $
*/
#include "eit.h"
@@ -136,8 +136,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
UseExtendedEventDescriptor = true;
}
if (UseExtendedEventDescriptor) {
- ExtendedEventDescriptors->Add(eed);
- d = NULL; // so that it is not deleted
+ if (ExtendedEventDescriptors->Add(eed))
+ d = NULL; // so that it is not deleted
}
if (eed->getDescriptorNumber() == eed->getLastDescriptorNumber())
UseExtendedEventDescriptor = false;
diff --git a/libsi/si.c b/libsi/si.c
index 0ef39397..3d5169f6 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 3.1 2013/10/30 10:16:18 kls Exp $
+ * $Id: si.c 3.2 2015/02/01 14:55:27 kls Exp $
* *
***************************************************************************/
@@ -198,17 +198,18 @@ void DescriptorGroup::Delete() {
}
}
-void DescriptorGroup::Add(GroupDescriptor *d) {
+bool DescriptorGroup::Add(GroupDescriptor *d) {
if (!array) {
length=d->getLastDescriptorNumber()+1;
array=new GroupDescriptor*[length]; //numbering is zero-based
for (int i=0;i<length;i++)
array[i]=0;
} else if (length != d->getLastDescriptorNumber()+1)
- return; //avoid crash in case of misuse
+ return false; //avoid crash in case of misuse
if (length <= d->getDescriptorNumber())
- return; // see http://www.vdr-portal.de/board60-linux/board14-betriebssystem/board69-c-t-vdr/p1025777-segfault-mit-vdr-1-7-21/#post1025777
+ return false; // see http://www.vdr-portal.de/board60-linux/board14-betriebssystem/board69-c-t-vdr/p1025777-segfault-mit-vdr-1-7-21/#post1025777
array[d->getDescriptorNumber()]=d;
+ return true;
}
bool DescriptorGroup::isComplete() {
diff --git a/libsi/si.h b/libsi/si.h
index 1e65111f..7c6f0e3e 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.h 3.2 2014/02/08 14:11:32 kls Exp $
+ * $Id: si.h 3.3 2015/02/01 14:55:27 kls Exp $
* *
***************************************************************************/
@@ -483,7 +483,7 @@ class DescriptorGroup {
public:
DescriptorGroup(bool deleteOnDesctruction=true);
~DescriptorGroup();
- void Add(GroupDescriptor *d);
+ bool Add(GroupDescriptor *d);
void Delete();
int getLength() { return length; }
GroupDescriptor **getDescriptors() { return array; }