[libbluray-devel] Validate that the play_item index is valid before accessing it
Hendrik Leppkes
git at videolan.org
Thu Apr 11 14:43:45 CEST 2013
libbluray | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Jan 27 20:59:41 2012 +0100| [b79d7b3cd5a4b82cbab95c4dbfeaaa483ccc1633] | committer: hpi1
Validate that the play_item index is valid before accessing it
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=b79d7b3cd5a4b82cbab95c4dbfeaaa483ccc1633
---
src/libbluray/bdnav/navigation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index 7dcedb0..e86d390 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -321,7 +321,7 @@ _fill_mark(NAV_TITLE *title, NAV_MARK *mark, int entry)
mark->mark_type = plm->mark_type;
mark->clip_ref = plm->play_item_ref;
clip = &title->clip_list.clip[mark->clip_ref];
- if (clip->cl != NULL) {
+ if (clip->cl != NULL && mark->clip_ref < title->pl->list_count) {
mark->clip_pkt = clpi_lookup_spn(clip->cl, plm->time, 1,
title->pl->play_item[mark->clip_ref].clip[title->angle].stc_id);
} else {
More information about the libbluray-devel
mailing list