[Git][videolan/libdvbpsi][branch/1.3.0-bugfix] 2 commits: descriptor: 0x41: correct max service count
Jean-Paul Saman <[email protected]> Fri, 08 Dec 2017 14:17:21 +0100
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============3633310516075140103==
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a2a90e136dca_2aa3fbf123e5ee853905b";
charset=UTF-8
Content-Transfer-Encoding: 7bit
----==_mimepart_5a2a90e136dca_2aa3fbf123e5ee853905b
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Jean-Paul Saman pushed to branch branch/1.3.0-bugfix at VideoLAN / libdvbpsi
Commits:
21db603c by Jean-Paul Saman at 2017-12-08T13:15:56+01:00
descriptor: 0x41: correct max service count
- - - - -
f5578204 by Jean-Paul Saman at 2017-12-08T13:18:59+01:00
NEWS: update
- - - - -
3 changed files:
- NEWS
- src/descriptors/dr_41.c
- src/descriptors/dr_41.h
Changes:
=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -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:
--------------------------------
=====================================
src/descriptors/dr_41.c
=====================================
--- a/src/descriptors/dr_41.c
+++ b/src/descriptors/dr_41.c
@@ -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 */
=====================================
src/descriptors/dr_41.h
=====================================
--- a/src/descriptors/dr_41.h
+++ b/src/descriptors/dr_41.h
@@ -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;
View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/compare/2570724002c52dc8b15fccafe7fbcb54c29b04b3...f55782042edefda0e3c1038b85a070864c0185ba
---
View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/compare/2570724002c52dc8b15fccafe7fbcb54c29b04b3...f55782042edefda0e3c1038b85a070864c0185ba
You're receiving this email because of your account on code.videolan.org.
----==_mimepart_5a2a90e136dca_2aa3fbf123e5ee853905b--
--===============3633310516075140103==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGliZHZicHNp
LWRldmVsIG1haWxpbmcgbGlzdApsaWJkdmJwc2ktZGV2ZWxAdmlkZW9sYW4ub3JnCmh0dHBzOi8v
bWFpbG1hbi52aWRlb2xhbi5vcmcvbGlzdGluZm8vbGliZHZicHNpLWRldmVsCg==
--===============3633310516075140103==--