db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DERBY-6393) at org.apache.derby.iapi.util.StringUtil.hexDump causes ArrayIndexOutOfBoundsException in jvm code.
Date Thu, 24 Oct 2013 23:01:02 GMT

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

Mike Matrigali edited comment on DERBY-6393 at 10/24/13 10:59 PM:
------------------------------------------------------------------

The offending code is, where data is a byte[]

{noformat}
 for (int j = 0; (j < 16) && ((i + j) < data.length); j++)
                {
                    char char_value = (char) data[i + j];

                    // RESOLVE (really want isAscii() or isPrintable())
                    if (Character.isLetterOrDigit(char_value))
                        str.append(String.valueOf(char_value));
                    else
                        str.append(".");
                }
{noformat}



was (Author: mikem):
The offending code is, where data is a byte[]
{noformat}
 for (int j = 0; (j < 16) && ((i + j) < data.length); j++)
                {
                    char char_value = (char) data[i + j];

                    // RESOLVE (really want isAscii() or isPrintable())
                    if (Character.isLetterOrDigit(char_value))
                        str.append(String.valueOf(char_value));
                    else
                        str.append(".");
                }
{noformat}


> at org.apache.derby.iapi.util.StringUtil.hexDump causes ArrayIndexOutOfBoundsException
in jvm code.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6393
>                 URL: https://issues.apache.org/jira/browse/DERBY-6393
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.11.0.0
>            Reporter: Mike Matrigali
>            Priority: Minor
>
> A call to at org.apache.derby.iapi.util.StringUtil.hexDump causes:
> Caused by: java.lang.ArrayIndexOutOfBoundsException
> at java.lang.CharacterDataLatin1.getProperties(CharacterDataLatin1.java:72)
> at java.lang.CharacterDataLatin1.getType(CharacterDataLatin1.java:103)
> at java.lang.Character.getType(Character.java:6734)
> at java.lang.Character.isLetterOrDigit(Character.java:5658)
> at java.lang.Character.isLetterOrDigit(Character.java:5637)
> at org.apache.derby.iapi.util.StringUtil.hexDump(Unknown Source)
> at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Unknown Source)
> at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source)
> at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
> at org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message