[jira] [Created] (BATIK-1217) short url() references break when SVG files are inside a JAR file

"Andrew Wils (JIRA)" <[email protected]>
Newsgroups gmane.text.xml.batik.devel
Message-ID <[email protected]>
Andrew Wils created BATIK-1217:
----------------------------------

             Summary: short url() references break when SVG files are inside a JAR file
                 Key: BATIK-1217
                 URL: https://issues.apache.org/jira/browse/BATIK-1217
             Project: Batik
          Issue Type: Bug
          Components: Utilities
            Reporter: Andrew Wils


When parsing an SVG file inside a JAR, ParsedURLDefaultProtocolHandler gets called for url references.

Its first statement is this:
{code:java}
String start = urlStr.substring(0, JAR.length()+1).toLowerCase();{code}
if the urlStr is very short (e.g. "#s"), this triggers an AIOOBE.

To reproduce, create a gradient that has a single-character id and use it elsewhere:
{code:java}
<linearGradient id="v" ...>
...
</linearGradient>
...
<circle ... fill="url(#v)" ... />{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.