[
https://issues.apache.org/jira/browse/DERBY-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680586#action_12680586
]
Bryan Pendleton commented on DERBY-4088:
----------------------------------------
> why the client splits the data into smaller chunks when it is small enough to
> fit in a single DSS
Yes, this is quite intriguing. It might be more than suboptimal. I vaguely
recall thinking
that the algorithms for assembling fragments across buffers assumed that the
only 'short' segment was the last segment.
But it's been several years since I studied this code, so I may be
misremembering.
> 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: 10.4.2.0
> Environment: CentOS 5, java 1.6.0_11
> Reporter: Urban Widmark
> Attachments: 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.