summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-09-16 14:08:42 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2015-09-16 14:08:42 +0200
commit5d249c1ae51550636b1879621354ea05ba2e5a64 (patch)
tree33262137e6a4493161afe218d13aa1f6f3c3e96f /receiver.c
parent09e64c24f277a8433848d320fb3dc70c2f7d1b25 (diff)
downloadvdr-5d249c1ae51550636b1879621354ea05ba2e5a64.tar.gz
vdr-5d249c1ae51550636b1879621354ea05ba2e5a64.tar.bz2
Fixed an overflow of PIDs in a receiver
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/receiver.c b/receiver.c
index d8f51e68..8d647c02 100644
--- a/receiver.c
+++ b/receiver.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: receiver.c 3.3 2015/01/12 14:04:31 kls Exp $
+ * $Id: receiver.c 4.1 2015/09/16 11:19:47 kls Exp $
*/
#include "receiver.h"
@@ -37,8 +37,10 @@ void cReceiver::SetPriority(int Priority)
bool cReceiver::AddPid(int Pid)
{
if (Pid) {
- if (numPids < MAXRECEIVEPIDS)
- pids[numPids++] = Pid;
+ if (numPids < MAXRECEIVEPIDS) {
+ if (!WantsPid(Pid))
+ pids[numPids++] = Pid;
+ }
else {
dsyslog("too many PIDs in cReceiver (Pid = %d)", Pid);
return false;