summaryrefslogtreecommitdiff
path: root/pat.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-16 10:14:19 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-16 10:14:19 +0200
commitac13b6e161eb7dac3ff3fb14c50d2bec4187f2d1 (patch)
treecd1bb297d3ca0fae6dfbfb5059d7c8fa84f490c0 /pat.c
parent6415cc900de3361925d22f879077be687fce3858 (diff)
downloadvdr-ac13b6e161eb7dac3ff3fb14c50d2bec4187f2d1.tar.gz
vdr-ac13b6e161eb7dac3ff3fb14c50d2bec4187f2d1.tar.bz2
Fixed a possible crash with inconsistent SI data
Diffstat (limited to 'pat.c')
-rw-r--r--pat.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/pat.c b/pat.c
index 260f67d3..a0124f7b 100644
--- a/pat.c
+++ b/pat.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.c 1.9 2004/05/23 09:29:04 kls Exp $
+ * $Id: pat.c 1.10 2004/10/16 10:01:12 kls Exp $
*/
#include "pat.h"
@@ -285,8 +285,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
return;
SI::PAT::Association assoc;
int Index = 0;
- for (SI::Loop::Iterator it; pat.associationLoop.hasNext(it); ) {
- assoc = pat.associationLoop.getNext(it);
+ for (SI::Loop::Iterator it; pat.associationLoop.getNext(assoc, it); ) {
if (!assoc.isNITPid()) {
if (Index++ == pmtIndex) {
pmtPid = assoc.getPid();
@@ -332,8 +331,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
int Tpid = 0;
int NumApids = 0;
int NumDpids = 0;
- for (SI::Loop::Iterator it; pmt.streamLoop.hasNext(it); ) {
- stream = pmt.streamLoop.getNext(it);
+ for (SI::Loop::Iterator it; pmt.streamLoop.getNext(stream, it); ) {
switch (stream.getStreamType()) {
case 1: // STREAMTYPE_11172_VIDEO
case 2: // STREAMTYPE_13818_VIDEO