[bTSstream-devel] dvb_print_si: fix segfault

Christophe Massiot git at videolan.org
Sun Dec 6 18:30:22 CET 2015


bitstream | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Sun Dec  6 18:30:03 2015 +0100| [1107491857015dae69c5cb6116ef256ecb77ad14] | committer: Christophe Massiot

dvb_print_si: fix segfault

> http://git.videolan.org/gitweb.cgi/bitstream.git/?a=commit;h=1107491857015dae69c5cb6116ef256ecb77ad14
---

 examples/dvb_print_si.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/dvb_print_si.c b/examples/dvb_print_si.c
index e7d8e7e..51fecca 100644
--- a/examples/dvb_print_si.c
+++ b/examples/dvb_print_si.c
@@ -293,7 +293,9 @@ static void handle_pat(void)
                     for (i_pmt = 0; i_pmt < i_nb_sids; i_pmt++)
                         if (pp_sids[i_pmt]->i_sid == i_sid) {
                             pp_sids[i_pmt]->i_sid = 0;
-                            handle_pmt_es(pp_sids[i_pmt]->p_current_pmt, false);
+                            if (pp_sids[i_pmt]->p_current_pmt != NULL)
+                                handle_pmt_es(pp_sids[i_pmt]->p_current_pmt,
+                                              false);
                             free(pp_sids[i_pmt]->p_current_pmt);
                             pp_sids[i_pmt]->p_current_pmt = NULL;
                             psi_table_free(pp_sids[i]->pp_eit_sections);



More information about the biTStream-devel mailing list