Bug 23965

Summary: ArrayIndexOutOfBoundsException when trying to match IP
Product: Regexp Reporter: Sascha Spiekermann <sascha.spiekermann>
Component: OtherAssignee: Jakarta Notifications Mailing List <notifications>
Status: CLOSED DUPLICATE    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Sascha Spiekermann 2003-10-21 08:55:00 UTC
Hello,
when trying to validate "139.27.197.255" with "(((25[0-5])|(2[0-4]\d)|([01]?\d?
\d))\.){3}(((25[0-5])|(2[0-4]\d)|([01]?\d?\d)))" I get following exception:

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:933)
        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:910)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        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:910)
        at org.apache.regexp.RE.matchNodes(RE.java:1376)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        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:910)
        at org.apache.regexp.RE.matchNodes(RE.java:1376)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        at org.apache.regexp.RE.matchNodes(RE.java:933)
        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:910)
        at org.apache.regexp.RE.matchNodes(RE.java:1376)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        at org.apache.regexp.RE.matchNodes(RE.java:910)
        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)
Comment 1 Oleg Sukhodolsky 2003-10-22 02:11:04 UTC
I think this bug was fixed in 1.3.  At least, I'm able to reproduce it in 1.2
and unable to reproduce in 1.3. Although, I don't know (yet) which change fixes
it.
Comment 2 Oleg Sukhodolsky 2003-10-22 18:53:32 UTC
I think this is a duplicate of 8467 ([PATCH] Number of paren pairs limited to 
16)
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8467).  
Comment 3 Vadim Gritsenko 2003-10-22 23:13:03 UTC
Yes, you are totally right.

*** This bug has been marked as a duplicate of 8467 ***