[libbluray-devel] Fix possible crash in bd_start_bdj()
hpi1
git at videolan.org
Tue May 27 11:29:19 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue May 27 12:21:18 2014 +0300| [c0c556957d5bd9cb6ad41d7cb25b2d800133f9f3] | committer: hpi1
Fix possible crash in bd_start_bdj()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=c0c556957d5bd9cb6ad41d7cb25b2d800133f9f3
---
src/libbluray/bluray.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 42221ca..8de2b05 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2618,10 +2618,12 @@ int bd_start_bdj(BLURAY *bd, const char *start_object)
}
/* valid BD-J title from disc index ? */
- for (ii = 0; ii <= bd->disc_info.num_titles; ii++) {
- t = bd->disc_info.titles[ii];
- if (t && t->bdj && t->id_ref == title_num) {
- return _start_bdj(bd, ii);
+ if (bd->disc_info.titles) {
+ for (ii = 0; ii <= bd->disc_info.num_titles; ii++) {
+ t = bd->disc_info.titles[ii];
+ if (t && t->bdj && t->id_ref == title_num) {
+ return _start_bdj(bd, ii);
+ }
}
}
More information about the libbluray-devel
mailing list