From 6c74c10cbba912e67a6c72a93e1d8b8b2692d42e Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 21 Oct 2018 12:25:15 +0300 Subject: [PATCH] Add an upper limit for pid validity according to the SAT>IP specification. --- device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.c b/device.c index b6e5ee6..830fa9b 100644 --- a/device.c +++ b/device.c @@ -390,7 +390,7 @@ void cSatipDevice::SetChannelTuned(void) bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP) { debug12("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP ? handleP->pid : -1, typeP, onP, deviceIndexM); - if (pTunerM && handleP && handleP->pid >= 0) { + if (pTunerM && handleP && handleP->pid >= 0 && handleP->pid <= 8191) { if (onP) return pTunerM->SetPid(handleP->pid, typeP, true); else if (!handleP->used && pSectionFilterHandlerM && !pSectionFilterHandlerM->Exists(handleP->pid))