Commit 1aff613d authored by Jean-Paul Saman's avatar Jean-Paul Saman

CAT: The p_section->p_payload_start pointer already points to the fist...

CAT: The p_section->p_payload_start pointer already points to the fist descriptor for this PSI section.

According to ITU-T Rec H.222.0 and the code in dvbpsi_packet_push() the
p_section->p_payload_start pointer already points to the first descriptor for
this PSI table. Adding 5 bytes is plain wrong.
parent 37d5d89b
...@@ -347,7 +347,7 @@ void dvbpsi_cat_sections_decode(dvbpsi_cat_t* p_cat, dvbpsi_psi_section_t* p_sec ...@@ -347,7 +347,7 @@ void dvbpsi_cat_sections_decode(dvbpsi_cat_t* p_cat, dvbpsi_psi_section_t* p_sec
{ {
/* CAT descriptors */ /* CAT descriptors */
p_byte = p_section->p_payload_start; p_byte = p_section->p_payload_start;
while (p_byte + 5 <= p_section->p_payload_end) while (p_byte <= p_section->p_payload_end)
{ {
uint8_t i_tag = p_byte[0]; uint8_t i_tag = p_byte[0];
uint8_t i_length = p_byte[1]; uint8_t i_length = p_byte[1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment