Project

General

Profile

Bug #2115

cat: invalid length

Added by Phill Lavender over 10 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
DVB
Target version:
-
Start date:
2014-05-27
Due date:
% Done:

100%

Estimated time:
Found in version:
master head
Affected Versions:

Description

In the current code the cat_callback requires a minimum of 7 bytes of data else it throws an error in the dvb_table_begin sub method.

dvb_cat_callback...
/* Start */
r = dvb_table_begin(mt, ptr, len, tableid, 0, 7, &st, &sect, &last, &ver);

I have an example of provider not setting any a descriptor() in the table at all (i.e. N=0). Thus the total length from the section_length to the end of the CRC is 9 bytes (section_length is set to 0x009 : 12 bits in the cat table from dvbsnoop extract)

transport_stream_id:16 bits
reserved: 2 bits
version_number: 5 bits
current_next_indicator: 1 bits
section_number: 8 bits
last_section_number: 8 bits
for i = 0 to N
descriptor() var (0 bits)
next
CRC_32: 32 bits

= 9 bytes

Removing the 4 byte CRC gives a minimum of 5 bytes for the table with no descriptor().

To avoid the error dvb_table_begin minlength for dvb_cat_callback should be reduced to 5

Phill

History

#1

Updated by Phill Lavender over 10 years ago

Created pull request #410 to merger this change into the master.
https://github.com/tvheadend/tvheadend/pull/410
Phill

#2

Updated by Adam Sutton over 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|aad7b63138837b2284bbc831666892ba4af6c766.

Also available in: Atom PDF