commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1162) StringUtils#equals fails with Index OOBE on non-Strings with identical leading prefix
Date Sun, 31 Jul 2016 16:01:20 GMT

    [ https://issues.apache.org/jira/browse/LANG-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15401212#comment-15401212
] 

ASF GitHub Bot commented on LANG-1162:
--------------------------------------

Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/181
  
    
    [![Coverage Status](https://coveralls.io/builds/7239890/badge)](https://coveralls.io/builds/7239890)
    
    Coverage decreased (-0.02%) to 93.411% when pulling **8dea56a0a7d20ba61f8edb49da3b0a6233252d05
on RamAnvesh:master** into **1a1fc65b04bcbe2e95d0fa300fce110e1224906e on apache:master**.



> StringUtils#equals fails with Index OOBE on non-Strings with identical leading prefix
> -------------------------------------------------------------------------------------
>
>                 Key: LANG-1162
>                 URL: https://issues.apache.org/jira/browse/LANG-1162
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.4
>            Reporter: Sebb
>            Assignee: Sebb
>             Fix For: 3.5
>
>
> From the Commons User mailing list:
> {quote}
> StringUtils.equals(cs1,cs2) delegates to CharSequence.regionMatches(...) in a way that
causes IndexOutOfBounds when either of cs1/cs2 isn't a String.
> Specifically, comparing "foo" and "foobar" for non-String CharSequences bombs due to
CharSequenceUtils.regionMatches(cs1, false, 0, cs2, 0, Math.max(cs1.length(), cs2.length()))
because regionMatches doesn't check for input exhaustion.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message