Commit ff208b73 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

DVDNav: fix dvdnav_describe_title_chapters crash

Close #6578
parent 5ee17b1c
diff --git a/src/searching.c b/src/searching.c
index 3649e9d..0b5f22a 100644
--- a/src/searching.c
+++ b/src/searching.c
@@ -640,7 +640,11 @@ uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t
goto fail;
}
- cellnr = pgc->program_map[ptt[i].pgn-1];
+ if ((cellnr = pgc->program_map[ptt[i].pgn-1]) == 0) {
+ printerr("Cell new row cannot be 0");
+ continue;
+ }
+
if(ptt[i].pgn < pgc->nr_of_programs)
endcellnr = pgc->program_map[ptt[i].pgn];
else
......@@ -18,6 +18,7 @@ $(TARBALLS)/libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2:
dvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 .sum-dvdnav
$(UNPACK)
$(APPLY) $(SRC)/dvdnav/dvdnav.patch
$(APPLY) $(SRC)/dvdnav/libdvdnav-searching.c-check-cellnr-before-indexing.patch
$(MOVE)
DEPS_dvdnav = dvdcss dvdread
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment