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

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


Author: reimar
Date: Sun Feb 23 20:17:23 2014
New Revision: 36909

Log:
Add additional sanity checks.

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Sun Feb 23 20:09:08 2014	(r36908)
+++ trunk/stream/stream_dvd.c	Sun Feb 23 20:17:23 2014	(r36909)
@@ -520,6 +520,9 @@ static void list_chapters(ifo_handle_t *
     mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: ");
     for(i=0; i<vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts; i++)
     {
+        int pgc_idx = ptt[i].pgcn-1;
+        if (pgc_idx < 0 || pgc_idx >= vts_file->vts_pgcit->nr_of_pgci_srp)
+            continue;
         pgc = vts_file->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc;
         if (!pgc)
             continue;


More information about the MPlayer-cvslog mailing list