Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 54CD3200B55 for ; Sun, 31 Jul 2016 18:22:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5034A160A61; Sun, 31 Jul 2016 16:22:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A9C35160AA9 for ; Sun, 31 Jul 2016 18:22:21 +0200 (CEST) Received: (qmail 90445 invoked by uid 500); 31 Jul 2016 16:22:20 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 90325 invoked by uid 99); 31 Jul 2016 16:22:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jul 2016 16:22:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7D9282C0D62 for ; Sun, 31 Jul 2016 16:22:20 +0000 (UTC) Date: Sun, 31 Jul 2016 16:22:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1162) StringUtils#equals fails with Index OOBE on non-Strings with identical leading prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 31 Jul 2016 16:22:22 -0000 [ https://issues.apache.org/jira/browse/LANG-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15401223#comment-15401223 ] ASF GitHub Bot commented on LANG-1162: -------------------------------------- Github user RamAnvesh commented on the issue: https://github.com/apache/commons-lang/pull/181 Ouch!.. ok.. closing.. > 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)