libbluray | branch: master | hpi1 <[email protected]> | Thu Sep 17 18:24:30 2015 +0300| [84351639ddce602c736b688e4a9b003ed4ba78eb] | committer: hpi1
SIElementFilter: validate locator > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=84351639ddce602c736b688e4a9b003ed4ba78eb --- .../java/javax/tv/service/navigation/SIElementFilter.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libbluray/bdj/java/javax/tv/service/navigation/SIElementFilter.java b/src/libbluray/bdj/java/javax/tv/service/navigation/SIElementFilter.java index 28d9665..f0dc97c 100644 --- a/src/libbluray/bdj/java/javax/tv/service/navigation/SIElementFilter.java +++ b/src/libbluray/bdj/java/javax/tv/service/navigation/SIElementFilter.java @@ -1,6 +1,7 @@ /* * This file is part of libbluray * Copyright (C) 2010 William Hahne + * Copyright (C) 2015 Petri Hintukainen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,9 +26,21 @@ import javax.tv.service.SIElement; import javax.tv.service.SIRequest; import javax.tv.service.SIRequestorImpl; +import org.bluray.net.BDLocator; + public final class SIElementFilter extends ServiceFilter { public SIElementFilter(SIElement element) throws FilterNotSupportedException { + if (element == null) + throw new NullPointerException(); + + try { + new BDLocator(element.getLocator().toExternalForm()); + } catch (Exception e) { + System.err.println("Invalid SI element: " + e + " at " + org.videolan.Logger.dumpStack(e)); + throw new FilterNotSupportedException(); + } + this.element = element; } _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
