Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.10
-
None
-
None
Description
If there is a short relative hyper refrence less four chars length in total within a svg file which is packed into a jar file. Loading it will cause an java.lang.IndexOutOfBoundsException to be thrown.
example file:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="320" height="320" viewBox="0 0 320 320" stroke-linecap="round" stroke="#000"> <defs> <path id="r" d="m160,160l0,0 0,0"> </path> </defs> <use xlink:href="#r"/> </svg>
Point of failure:
org.apache.batik.util.ParsedURLJarProtocolHandler - parseURL Method
String start = urlStr.substring(0, JAR.length()+1).toLowerCase();
Problem should be solved by adding an additional check within org.apache.batik.util.ParsedURLJarProtocolHandler 's parseURL method or by using startsWith string method ...