[libbluray-devel] Fix possible 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 14:06:30 2015 +0300| [b8763d525d480332530e8a49ab7cfe205fb44c7f] | committer: hpi1

Fix possible null pointer dereference

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

 src/libbluray/bdj/java/org/videolan/BDJLoader.java |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJLoader.java b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
index 22bd37a..30fb8c4 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJLoader.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
@@ -147,6 +147,15 @@ public class BDJLoader {
                 AppID id = (AppID)ids.nextElement();
                 BDJAppProxy proxy = (BDJAppProxy)db.getAppProxy(id);
                 AppEntry entry = (AppEntry)db.getAppAttributes(id);
+                if (proxy == null) {
+                    logger.error("AppsDatabase corrupted!");
+                    continue;
+                }
+                if (entry == null) {
+                    logger.error("AppsDatabase corrupted!");
+                    proxy.release();
+                    continue;
+                }
                 for (int i = 0; i < appTable.length; i++) {
                     if (id.equals(appTable[i].getIdentifier()) &&
                         entry.getInitialClass().equals(appTable[i].getInitialClass())) {



More information about the libbluray-devel mailing list