https://issues.apache.org/bugzilla/show_bug.cgi?id=48619
Summary: ^([:alpha:]){0,15}$ causes
ArrayIndexOutOfBoundsException
Product: Regexp
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
RE re = new RE("^([:alpha:]){0,15}$");
boolean match = re.match("test");
This code causes an ArrayIndexOutOfBoundsException if I set the max length to
15 or more. It does not occur if it is less than 15.
It fails with versions 1.4 and 1.5.
------- Stacktrace -------
java.lang.ArrayIndexOutOfBoundsException: 16
at org.apache.regexp.RE.getParenEnd(RE.java:724)
at org.apache.regexp.RE.matchNodes(RE.java:942)
at org.apache.regexp.RE.matchNodes(RE.java:910)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:933)
at org.apache.regexp.RE.matchNodes(RE.java:910)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:933)
at org.apache.regexp.RE.matchNodes(RE.java:910)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchNodes(RE.java:933)
at org.apache.regexp.RE.matchNodes(RE.java:910)
at org.apache.regexp.RE.matchNodes(RE.java:1376)
at org.apache.regexp.RE.matchAt(RE.java:1448)
at org.apache.regexp.RE.match(RE.java:1498)
at org.apache.regexp.RE.match(RE.java:1468)
at org.apache.regexp.RE.match(RE.java:1561)
at ...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]