You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/01/18 14:45:47 UTC

DO NOT REPLY [Bug 5920] New: - StringUtils chop function crashes if string too short.

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=5920>.
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=5920

StringUtils chop function crashes if string too short.

           Summary: StringUtils chop function crashes if string too short.
           Product: Velocity
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: acmo@aol.com


The chop function in org.apache.velocity.util.StringUtils.java, crashes (throws 
ArrayOutOfBoundsException) when passed a string of length 1 (where EOL length 
is 2). The test for EOL should include a check that the string is long enough 
to check for the EOL.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>