[libdvbpsi-devel] dr_83.c: check number of entries to be no more then 63.

Jean-Paul Saman git at videolan.org
Wed Dec 24 12:51:57 CET 2014


libdvbpsi | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Wed Dec 24 11:47:57 2014 +0100| [1e3a2eb7c22f368c750ab053a3211c8e01be2d64] | committer: Jean-Paul Saman

dr_83.c: check number of entries to be no more then 63.

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=1e3a2eb7c22f368c750ab053a3211c8e01be2d64
---

 src/descriptors/dr_83.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/descriptors/dr_83.c b/src/descriptors/dr_83.c
index 208f014..cc59609 100644
--- a/src/descriptors/dr_83.c
+++ b/src/descriptors/dr_83.c
@@ -90,6 +90,9 @@ dvbpsi_lcn_dr_t *dvbpsi_DecodeLCNDr(dvbpsi_descriptor_t *p_descriptor)
 dvbpsi_descriptor_t* dvbpsi_GenLCNDr(dvbpsi_lcn_dr_t* p_decoded,
                                        bool b_duplicate)
 {
+    if (p_decoded->i_number_of_entries > 63)
+        p_decoded->i_number_of_entries = 63;
+
     dvbpsi_descriptor_t* p_descriptor = dvbpsi_NewDescriptor(0x83, p_decoded->i_number_of_entries * 4, 0);
     if (NULL == p_descriptor)
         return NULL;



More information about the libdvbpsi-devel mailing list