]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvbcam: Fix NULL pointer usage
authorJasmin Jessich <jasmin@anw.at>
Sun, 26 Nov 2017 02:42:44 +0000 (03:42 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 27 Nov 2017 11:57:16 +0000 (12:57 +0100)
When there is already a CAM assigned to the service, we jump to
update_pid. In commit 7f81d726af1f92b268d031c08cf5d00f0f77a4c6 a
tvhtrace call which prints the CAM name has been added. The name
is accessed by "ac->ca->lca_name", which requires ac set to a
proper value.
This commit adds the ac setting before it jumps to "update_pid".

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
src/descrambler/dvbcam.c

index d483369a8c986c939927ce568659a73eddb81fad..cce0cebf856dbefcd5eaf0be0358597965ef207d 100644 (file)
@@ -410,8 +410,10 @@ dvbcam_service_start(caclient_t *cac, service_t *t)
 
   /* is there already a CAM associated to the service? */
   TAILQ_FOREACH(as, &dvbcam_active_services, global_link) {
-    if (as->td_service == t)
+    if (as->td_service == t) {
+      ac = as->ac;
       goto update_pid;
+    }
   }
 
   /*