diff options
Diffstat (limited to 'libhb/dvd.c')
-rw-r--r-- | libhb/dvd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/dvd.c b/libhb/dvd.c index 05e9bde57..1c4eb60d3 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -178,6 +178,12 @@ hb_title_t * hb_dvd_title_scan( hb_dvd_t * d, int t ) goto fail; } + if( pgn <= 0 || pgn > 99 ) + { + hb_error( "scan: pgn %d not valid, skipping", pgn ); + goto fail; + } + /* Start cell */ title->cell_start = d->pgc->program_map[pgn-1] - 1; title->block_start = d->pgc->cell_playback[title->cell_start].first_sector; |