You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/04/24 21:49:37 UTC

DO NOT REPLY [Bug 8489] New: - ArrayIndexOutOfBoundsException's in org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilderImpl

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8489>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8489

ArrayIndexOutOfBoundsException's in org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilderImpl

           Summary: ArrayIndexOutOfBoundsException's in
                    org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilderImpl
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: ms53@inf.tu-dresden.de


Similar to Bug 6189 there are more calls to the resizeTextArray() method with 
arguments like '_text.length * 2'. These calls are in:

- ignorableWhitespace()
- comment()
- endDocument() (?)

It happened to me that the ArrayIndexOutOfBoundsException was thrown by the 
comment() method. I'm not sure if the same thing is possible in the two other 
methods, but it's very likely.

I suggest the same fix as for bug 6189 :

replacing resizeTextArray(_text.length * 2); with resizeTextArray(Math.max
(_text.length * 2, _currentOffset + length));