[MPlayer-cvslog] r36908 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Sun Feb 23 20:09:08 CET 2014


Author: reimar
Date: Sun Feb 23 20:09:08 2014
New Revision: 36908

Log:
Add some extra checks to avoid potential crashes.

Should avoid the issues described in #2127.

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Sun Feb 23 19:14:44 2014	(r36907)
+++ trunk/stream/stream_dvd.c	Sun Feb 23 20:09:08 2014	(r36908)
@@ -509,6 +509,8 @@ static void list_chapters(ifo_handle_t *
     unsigned int t=0;
     ptt_info_t *ptt;
     pgc_t *pgc;
+    if (!mp_msg_test(MSGT_IDENTIFY, MSGL_INFO))
+        return;
 
     title_no = tt_srpt->title[title_no].vts_ttn - 1;
     if(vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts < 2)
@@ -519,6 +521,8 @@ static void list_chapters(ifo_handle_t *
     for(i=0; i<vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts; i++)
     {
         pgc = vts_file->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc;
+        if (!pgc)
+            continue;
         cell = pgc->program_map[ptt[i].pgn-1]; //here the cell is 1-based
         if(ptt[i].pgn<pgc->nr_of_programs)
             last_cell = pgc->program_map[ptt[i].pgn];


More information about the MPlayer-cvslog mailing list