[libbluray-devel] _open_m2ts(): check for NULL clip

hpi1 git at videolan.org
Thu Mar 10 11:48:36 CET 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Mar  9 13:16:57 2016 +0200| [066527b1eeb9acbc445f7d4ceb07853807174518] | committer: hpi1

_open_m2ts(): check for NULL clip

It is not checked in all call paths leading here.

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

 src/libbluray/bluray.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index e3342e4..98cf105 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -588,6 +588,10 @@ static int _open_m2ts(BLURAY *bd, BD_STREAM *st)
 {
     _close_m2ts(st);
 
+    if (!st->clip) {
+        return 0;
+    }
+
     st->fp = disc_open_stream(bd->disc, st->clip->name);
 
     st->clip_size = 0;



More information about the libbluray-devel mailing list