[libbluray-devel] hdmv: fix call_object() when object reference is invalid

hpi1 git at videolan.org
Sat Mar 8 10:34:56 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Mar  6 15:21:37 2014 +0200| [de1acf06ffe904f3d75946a62b034a3dbfc7c1d2] | committer: hpi1

hdmv: fix call_object() when object reference is invalid

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=de1acf06ffe904f3d75946a62b034a3dbfc7c1d2
---

 src/libbluray/hdmv/hdmv_vm.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index 59ad55d..5bfc883 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -483,9 +483,13 @@ static int _jump_title(HDMV_VM *p, uint32_t title)
 
 static int _call_object(HDMV_VM *p, uint32_t object)
 {
+    if (object >= p->movie_objects->num_objects) {
+        BD_DEBUG(DBG_HDMV|DBG_CRIT, "_call_object(): invalid object %u\n", object);
+        return -1;
+    }
+
     BD_DEBUG(DBG_HDMV, "_call_object(%u)\n", object);
 
-    _queue_event(p, HDMV_EVENT_PLAY_STOP, 0);
     _suspend_object(p, 1);
 
     return _jump_object(p, object);



More information about the libbluray-devel mailing list