summaryrefslogtreecommitdiff
path: root/libsi
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-12-04 15:09:45 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2011-12-04 15:09:45 +0100
commit8db58ff99e815ebb42408a30bf84002bb7ee08dc (patch)
tree9ce96e3acdd95a5aa6047d38eb215876a40c103d /libsi
parent04e538072340d9ba7d0342fe59c755e4c8687775 (diff)
downloadvdr-8db58ff99e815ebb42408a30bf84002bb7ee08dc.tar.gz
vdr-8db58ff99e815ebb42408a30bf84002bb7ee08dc.tar.bz2
Fixed a crash with malformed SI data1.7.22
Diffstat (limited to 'libsi')
-rw-r--r--libsi/si.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsi/si.c b/libsi/si.c
index 840b3a1f..82123e17 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 2.4 2011/06/15 21:26:00 kls Exp $
+ * $Id: si.c 2.5 2011/12/04 15:06:18 kls Exp $
* *
***************************************************************************/
@@ -206,6 +206,8 @@ void DescriptorGroup::Add(GroupDescriptor *d) {
array[i]=0;
} else if (length != d->getLastDescriptorNumber()+1)
return; //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
array[d->getDescriptorNumber()]=d;
}