[libbluray-devel] MountManager: handle jar.getInputStream() SecurityException

hpi1 git at videolan.org
Tue Mar 31 11:44:57 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Mar 31 12:29:39 2015 +0300| [3ca309f634613e64e55704130380bc65c1c2626e] | committer: hpi1

MountManager: handle jar.getInputStream() SecurityException

Invalid jar file signature triggers SecurityException.
Skip invalid file and try to mount other files.

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

 src/libbluray/bdj/java/org/videolan/MountManager.java |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/org/videolan/MountManager.java b/src/libbluray/bdj/java/org/videolan/MountManager.java
index 25bd5ac..07e7359 100644
--- a/src/libbluray/bdj/java/org/videolan/MountManager.java
+++ b/src/libbluray/bdj/java/org/videolan/MountManager.java
@@ -111,7 +111,12 @@ public class MountManager {
 
                         logger.info("   mount: " + entry.getName());
 
-                        inStream = jar.getInputStream(entry);
+                        try {
+                            inStream = jar.getInputStream(entry);
+                        } catch (SecurityException se) {
+                            logger.error("Error uncompressing " + entry.getName() + " from " + path +  ": " + se + "\n" + Logger.dumpStack(se));
+                            continue;
+                        }
                         outStream = new FileOutputStream(out);
 
                         int length;



More information about the libbluray-devel mailing list