hb_error( "scan: pgc not valid, skipping" );
break;
}
hb_error( "scan: pgc not valid, skipping" );
break;
}
+ if (pgn > pgc->nr_of_programs)
+ {
+ pgn = 1;
+ continue;
+ }
+
duration += 90LL * dvdtime2msec( &pgc->playback_time );
cell_start = pgc->program_map[pgn-1] - 1;
duration += 90LL * dvdtime2msec( &pgc->playback_time );
cell_start = pgc->program_map[pgn-1] - 1;
pgc = ifo->vts_pgcit->pgci_srp[pgcn-1].pgc;
hb_log("pgc_id: %d, pgn: %d: pgc: 0x%x", pgcn, pgn, pgc);
pgc = ifo->vts_pgcit->pgci_srp[pgcn-1].pgc;
hb_log("pgc_id: %d, pgn: %d: pgc: 0x%x", pgcn, pgn, pgc);
+ if (pgn > pgc->nr_of_programs)
+ {
+ hb_error( "invalid PGN %d for title %d, skipping", pgn, t );
+ goto fail;
+ }
/* Title start */
title->cell_start = pgc->program_map[pgn-1] - 1;
/* Title start */
title->cell_start = pgc->program_map[pgn-1] - 1;