Commit 2061c2d8 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

Fix generation of the content descriptor

The generation function for the content descriptor makes out-of-bound array
accesses due to scaling an index value improperly.

(cherry picked from commit dc456b945fc6072154729e712e00bfd72fd32714)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 70a72d4a
...@@ -100,8 +100,8 @@ dvbpsi_descriptor_t * dvbpsi_GenContentDr( ...@@ -100,8 +100,8 @@ dvbpsi_descriptor_t * dvbpsi_GenContentDr(
/* Encode data */ /* Encode data */
for (int i = 0; i < p_decoded->i_contents_number; i++ ) for (int i = 0; i < p_decoded->i_contents_number; i++ )
{ {
p_descriptor->p_data[8 * i] = p_decoded->p_content[i].i_type; p_descriptor->p_data[2 * i] = p_decoded->p_content[i].i_type;
p_descriptor->p_data[8 * i + 1] = p_decoded->p_content[i].i_user_byte; p_descriptor->p_data[2 * i + 1] = p_decoded->p_content[i].i_user_byte;
} }
if (b_duplicate) if (b_duplicate)
......
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