Skip to content
Commits on Source (2)
......@@ -4,6 +4,7 @@ Changes between 1.3.1 and 1.3.2:
* Fix bug in dvbpsi_decoder_psi_section_add() set i_last_section_number
* Fix bug in descriptor 0x8a that prevented it from being parsed properly
* Fix bug in descriptor 0x56 generation with multiple teletext page entries
* Fix bug in descriptor 0x41 correct maximum service count
Changes between 1.3.0 and 1.3.1:
--------------------------------
......
......@@ -39,6 +39,8 @@
#include "dr_41.h"
#define DVBPSI_SLS_DR_MAX (84)
/*****************************************************************************
* dvbpsi_DecodeServiceListDr
*****************************************************************************/
......@@ -59,7 +61,7 @@ dvbpsi_service_list_dr_t* dvbpsi_DecodeServiceListDr(
unsigned int service_count = p_descriptor->i_length / 3;
if ((p_descriptor->i_length < 1) ||
(p_descriptor->i_length % 3 != 0) ||
(service_count>63))
(service_count > DVBPSI_SLS_DR_MAX - 1))
return NULL;
/* Allocate memory */
......@@ -91,7 +93,7 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceListDr(
bool b_duplicate)
{
/* Check the length */
if (p_decoded->i_service_count > 63)
if (p_decoded->i_service_count > DVBPSI_SLS_DR_MAX - 1)
return NULL;
/* Create the descriptor */
......
......@@ -59,7 +59,7 @@ typedef struct dvbpsi_service_list_dr_s
struct {
uint16_t i_service_id; /*!< service id */
uint8_t i_service_type; /*!< service type */
} i_service[64]; /*!< array of services */
} i_service[84]; /*!< array of services */
} dvbpsi_service_list_dr_t;
......