db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4088) DDMReader readBytes ArrayIndexOutOfBoundsException
Date Wed, 11 Mar 2009 23:24:50 GMT

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

Kathey Marsden commented on DERBY-4088:

Thanks Knut for fixing this issue. I was really surprised that we had never tried inserting
a blob of length 32766.  Just for good measure, with your patch,  I made sure we could insert
byte[]'s from 0 to 40000 and select them back again individually to hopefully make sure we
don't have any more gaps and it all passed.

I wonder if the client's Reply.java has a similar problem with its compressBLayerData and
how we might trigger that.  The javadoc says it shouldn't be used but we do cover it in code

> DDMReader readBytes ArrayIndexOutOfBoundsException
> --------------------------------------------------
>                 Key: DERBY-4088
>                 URL: https://issues.apache.org/jira/browse/DERBY-4088
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions:
>         Environment: CentOS 5, java 1.6.0_11
>            Reporter: Urban Widmark
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-4088.diff, derby-ddm.patch, DerbyBug.java
> DDMReader.readBytes(int length) checks the length vs DssConstants.MAX_DSS_LENGTH, but
ignores the fact that the buffer position "pos" might not be 0. If pos is non-zero then the
pos + length can be larger than the size of "buffer" causing an ArrayIndexOutOfBoundsException.
> For me this happened when sending a BLOB that was 32766 bytes long. The value of pos
was 2 in that method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message