[libbluray-devel] SIManager.getService(): validate locator
hpi1
git at videolan.org
Tue Sep 22 14:07:17 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Sep 17 18:19:54 2015 +0300| [150d73e6afb50ef8758f07ad8bd1e443769e4fcd] | committer: hpi1
SIManager.getService(): validate locator
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=150d73e6afb50ef8758f07ad8bd1e443769e4fcd
---
src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java b/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
index 4016876..f9d4a32 100644
--- a/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
+++ b/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
@@ -29,6 +29,7 @@ import javax.tv.service.navigation.ServiceListImpl;
import javax.tv.service.transport.Transport;
import javax.tv.service.transport.TransportImpl;
+import org.bluray.net.BDLocator;
import org.bluray.ti.TitleImpl;
import org.videolan.Libbluray;
@@ -82,6 +83,15 @@ public class SIManagerImpl extends SIManager {
}
public Service getService(Locator locator) throws InvalidLocatorException, SecurityException {
+
+ BDLocator bdLocator = null;
+ try {
+ bdLocator = new BDLocator(locator.toExternalForm());
+ } catch (org.davic.net.InvalidLocatorException e) {
+ System.err.println("invalid locator: " + locator.toExternalForm() + "\n" + org.videolan.Logger.dumpStack(e));
+ throw new javax.tv.locator.InvalidLocatorException(locator);
+ }
+
return titles.findService(locator);
}
More information about the libbluray-devel
mailing list