Author: rathann
Date: Fri Oct  4 00:21:29 2013
New Revision: 1261

Log:
This is a heuristic to prevent segfaults when
 ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc is invalid
 but non-NULL.

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:19:25 2013        (r1260)
+++ trunk/libdvdnav/src/searching.c     Fri Oct  4 00:21:29 2013        (r1261)
@@ -616,6 +616,10 @@ uint32_t dvdnav_describe_title_chapters(
   length = 0;
   for(i=0; i<parts; i++) {
     uint32_t cellnr, endcellnr;
+    if (ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc_start_byte >= 
ifo->vts_pgcit->last_byte) {
+      printerr("PGC start out of bounds");
+      continue;
+    }
     pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc;
     if (pgc == NULL) {
       printerr("PGC missing.");
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

Reply via email to