Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] VDR valgrinded
Hi,
during the hunt for the crash in libsi I let VDR run under valgrind [*].
The attached patch fixes three bugs of the categories "conditional jump on
uninitialised value" and "lost block".
Marcel
[*] to make VDR run under valgrind, pthread_rwlock_timedwrlock must be
replaced by pthread_rwlock_wrlock
diff -U 2 vdr-1.3.6/nit.c ./nit.c
--- vdr-1.3.6/nit.c Fri Feb 13 15:41:36 2004
+++ ./nit.c Thu Apr 8 22:46:19 2004
@@ -77,4 +77,5 @@
default: ;
}
+ delete d;
}
nits[numNits].networkId = nit.getNetworkId();
diff -U 2 vdr-1.3.6/pat.c ./pat.c
--- vdr-1.3.6/pat.c Sun Mar 7 17:59:00 2004
+++ ./pat.c Thu Apr 8 22:20:44 2004
@@ -212,4 +212,5 @@
{
cMutexLock MutexLock(&mutex);
+ StreamFlag = false; //initialize with default value
for (cCaDescriptors *ca = First(); ca; ca = Next(ca)) {
if (ca->Is(Source, Transponder, ServiceId))
@@ -327,6 +328,6 @@
int Apids[MAXAPIDS] = { 0 };
int Dpids[MAXAPIDS] = { 0 };
- char ALangs[MAXAPIDS][4];
- char DLangs[MAXAPIDS][4];
+ char ALangs[MAXAPIDS][4] = { "" };
+ char DLangs[MAXAPIDS][4] = { "" };
int Tpid = 0;
int NumApids = 0;
@@ -344,5 +345,4 @@
if (NumApids < MAXAPIDS) {
Apids[NumApids] = stream.getPid();
- *ALangs[NumApids] = 0;
SI::Descriptor *d;
for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
Home |
Main Index |
Thread Index