lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9c43dd04a208ee9a9aa19962d1da56b7c16bccf3.1606215584.git.mchehab+huawei@kernel.org>
Date:   Tue, 24 Nov 2020 12:06:11 +0100
From:   Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        "Daniel W. S. Almeida" <dwlsalmeida@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: [PATCH 15/31] media: vidtv: properly fill EIT service_id

The EIT header ID field should not contain the network ID, but,
instead, the service_id of the program described at EIT.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
 drivers/media/test-drivers/vidtv/vidtv_channel.c | 3 ++-
 drivers/media/test-drivers/vidtv/vidtv_psi.c     | 5 +++--
 drivers/media/test-drivers/vidtv/vidtv_psi.h     | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers/vidtv/vidtv_channel.c
index 84c4f3f25f77..d1d312566bc0 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_channel.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_channel.c
@@ -451,7 +451,8 @@ int vidtv_channel_si_init(struct vidtv_mux *m)
 		goto free_service_list;
 
 	m->si.eit = vidtv_psi_eit_table_init(m->network_id,
-					     m->transport_stream_id);
+					     m->transport_stream_id,
+					     programs->service_id);
 	if (!m->si.eit)
 		goto free_nit;
 
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index 341af312ad56..02dd217bdbf6 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -1809,7 +1809,8 @@ void vidtv_psi_eit_event_assign(struct vidtv_psi_table_eit *eit,
 
 struct vidtv_psi_table_eit
 *vidtv_psi_eit_table_init(u16 network_id,
-			  u16 transport_stream_id)
+			  u16 transport_stream_id,
+			  __be16 service_id)
 {
 	struct vidtv_psi_table_eit *eit;
 	const u16 SYNTAX = 0x1;
@@ -1824,7 +1825,7 @@ struct vidtv_psi_table_eit
 
 	eit->header.bitfield = cpu_to_be16((SYNTAX << 15) | (ONE << 14) | (ONES << 12));
 
-	eit->header.id = cpu_to_be16(network_id);
+	eit->header.id = service_id;
 	eit->header.current_next = ONE;
 
 	eit->header.version = 0x1f;
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.h b/drivers/media/test-drivers/vidtv/vidtv_psi.h
index 866fdf3d00e5..26b2c2f5774c 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.h
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.h
@@ -739,7 +739,8 @@ struct vidtv_psi_table_eit {
 
 struct vidtv_psi_table_eit
 *vidtv_psi_eit_table_init(u16 network_id,
-			  u16 transport_stream_id);
+			  u16 transport_stream_id,
+			  u16 service_id);
 
 
 /**
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ