Skip to content

Commit 6adc877

Browse files
authored
Merge pull request #11113 from emveepee/libdvbv5
v4l-utils: backport libdvbv5 DVB-T2 descriptor patch
2 parents 2bbb06d + b1fcc27 commit 6adc877

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Subject: libdvbv5: modify T2 delivery system descriptor
2+
Author: Martin Vallevand <mvallevand@gmail.com>
3+
Date: Fri Jan 2 18:50:48 2026 -0500
4+
5+
ETSI EN 300 468 6.4.4.3 specifies the frequency loop length in the T2
6+
delivery system descriptor in bytes but libdvbv5 populates it as the
7+
number of frequencies in the descriptor.
8+
9+
This change ensures that the byte length is correctly converted
10+
to the frequency count, preventing potential memory corruption
11+
and buffer overflows.
12+
13+
Signed-off-by: Martin Vallevand <mvallevand@gmail.com>
14+
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
15+
16+
lib/libdvbv5/descriptors/desc_t2_delivery.c | 2 +-
17+
1 file changed, 1 insertion(+), 1 deletion(-)
18+
19+
---
20+
21+
http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=95ad25f6a77a0a6650f5f657ac2c5046efcd04a0
22+
diff --git a/lib/libdvbv5/descriptors/desc_t2_delivery.c b/lib/libdvbv5/descriptors/desc_t2_delivery.c
23+
index f88718d350db..5d245cc973c5 100644
24+
--- a/lib/libdvbv5/descriptors/desc_t2_delivery.c
25+
+++ b/lib/libdvbv5/descriptors/desc_t2_delivery.c
26+
@@ -76,7 +76,7 @@ int dvb_desc_t2_delivery_init(struct dvb_v5_fe_parms *parms,
27+
p += sizeof(uint16_t);
28+
29+
if (d->tfs_flag) {
30+
- d->cell[d->num_cell].num_freqs = *p;
31+
+ d->cell[d->num_cell].num_freqs = *p / sizeof(*d->centre_frequency);
32+
p++;
33+
}
34+
else

0 commit comments

Comments
 (0)