Mercurial > libdvdnav.hg
comparison searching.c @ 425:323e54a7f200 src
Prevent segmentation faults in vdnav_describe_title_chapters()
in case of parts with missing PGC.
Patch by Fabian Keil !fk#fabiankeil$de%
author | rathann |
---|---|
date | Thu, 03 Oct 2013 22:19:25 +0000 |
parents | 4219a513c804 |
children | 79921c6bb4e8 |
comparison
equal
deleted
inserted
replaced
424:4219a513c804 | 425:323e54a7f200 |
---|---|
615 | 615 |
616 length = 0; | 616 length = 0; |
617 for(i=0; i<parts; i++) { | 617 for(i=0; i<parts; i++) { |
618 uint32_t cellnr, endcellnr; | 618 uint32_t cellnr, endcellnr; |
619 pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; | 619 pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; |
620 if (pgc == NULL) { | |
621 printerr("PGC missing."); | |
622 continue; | |
623 } | |
620 if(ptt[i].pgn > pgc->nr_of_programs) { | 624 if(ptt[i].pgn > pgc->nr_of_programs) { |
621 printerr("WRONG part number."); | 625 printerr("WRONG part number."); |
622 goto fail; | 626 goto fail; |
623 } | 627 } |
624 | 628 |