[DVDnav-discuss] r1260 - trunk/libdvdnav/src/searching.c

rathann subversion at mplayerhq.hu
Fri Oct 4 00:19:25 CEST 2013


Author: rathann
Date: Fri Oct  4 00:19:25 2013
New Revision: 1260

Log:
Prevent segmentation faults in vdnav_describe_title_chapters()
 in case of parts with missing PGC.

Patch by Fabian Keil !fk#fabiankeil$de%

Modified:
   trunk/libdvdnav/src/searching.c

Modified: trunk/libdvdnav/src/searching.c
==============================================================================
--- trunk/libdvdnav/src/searching.c	Fri Oct  4 00:10:07 2013	(r1259)
+++ trunk/libdvdnav/src/searching.c	Fri Oct  4 00:19:25 2013	(r1260)
@@ -617,6 +617,10 @@ uint32_t dvdnav_describe_title_chapters(
   for(i=0; i<parts; i++) {
     uint32_t cellnr, endcellnr;
     pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc;
+    if (pgc == NULL) {
+      printerr("PGC missing.");
+      continue;
+    }
     if(ptt[i].pgn > pgc->nr_of_programs) {
       printerr("WRONG part number.");
       goto fail;


More information about the DVDnav-discuss mailing list