Commit dc289303 authored by Angelo Schiavone's avatar Angelo Schiavone Committed by Jean-Paul Saman

fixes NIT and BAT descriptors loop decoding, p_end is now correctly calculated

Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 81045614
...@@ -489,8 +489,7 @@ void dvbpsi_bat_sections_decode(dvbpsi_bat_t* p_bat, ...@@ -489,8 +489,7 @@ void dvbpsi_bat_sections_decode(dvbpsi_bat_t* p_bat,
p_byte += 2 + i_length; p_byte += 2 + i_length;
} }
p_end = p_byte + (((uint16_t)(p_byte[0] & 0x0f) << 8) p_end = 2 + p_byte + (((uint16_t)(p_byte[0] & 0x0f) << 8) | p_byte[1]);
| p_byte[1]);
if (p_end > p_section->p_payload_end) if (p_end > p_section->p_payload_end)
p_end = p_section->p_payload_end; p_end = p_section->p_payload_end;
......
...@@ -474,8 +474,7 @@ void dvbpsi_nit_sections_decode(dvbpsi_nit_t* p_nit, ...@@ -474,8 +474,7 @@ void dvbpsi_nit_sections_decode(dvbpsi_nit_t* p_nit,
} }
/* Transport stream loop length */ /* Transport stream loop length */
p_end = p_byte + (((uint16_t)(p_byte[0] & 0x0f) << 8) p_end = 2 + p_byte + (((uint16_t)(p_byte[0] & 0x0f) << 8) | p_byte[1]);
| p_byte[1]);
if (p_end > p_section->p_payload_end) if (p_end > p_section->p_payload_end)
p_end = p_section->p_payload_end; p_end = p_section->p_payload_end;
......
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