[libbluray-devel] Fix null pointer dereference

hpi1 git at videolan.org
Wed Jun 3 10:37:49 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Jun  2 12:18:23 2015 +0300| [190d5837ae5c58124bff1989948139567fc69455] | committer: hpi1

Fix null pointer dereference

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

 .../bdj/java/org/videolan/media/content/playlist/Handler.java    |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
index 7e52949..57780d4 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
@@ -294,7 +294,11 @@ public class Handler extends BDHandler {
 
     protected void doEndOfMediaReached(int playlist) {
         synchronized (this) {
-            if (locator == null || locator.getPlayListId() != playlist) {
+            if (locator == null) {
+                System.err.println("endOfMedia(" + playlist + ") ignored: no current locator");
+                return;
+            }
+            if (locator.getPlayListId() != playlist) {
                 System.err.println("endOfMedia ignored: playlist does not match (" + playlist + " != " + locator.getPlayListId());
                 return;
             }



More information about the libbluray-devel mailing list