Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 941 - Enable to rewrite on a RequestOutputStream with big size
Summary: Enable to rewrite on a RequestOutputStream with big size
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.2
Hardware: PC All
: P2 major
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2013-02-01 16:36 UTC by Corsaire
Modified: 2013-06-21 10:46 UTC (History)
2 users (show)

See Also:


Attachments
test case (178.35 KB, application/x-zip-compressed)
2013-02-01 16:37 UTC, Corsaire
Details
proposal correction (77.50 KB, text/plain)
2013-02-01 16:40 UTC, Corsaire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Corsaire 2013-02-01 16:36:36 UTC
When we try to rewrite a big array octet on a RequestOutputStream using write_octet_array method we have an exception later on writing this RequestOutputStream on a connection.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
 at java.lang.System.arraycopy(Native Method)
 at java.io.BufferedOutputStream.write(Unknown Source)
 at org.jacorb.orb.etf.StreamConnectionBase.write StreamConnectionBase.java:190)
at org.jacorb.orb.giop.GIOPConnection.write(GIOPConnection.java:949)
at org.jacorb.orb.CDROutputStream.write(CDROutputStream.java:450)
at org.jacorb.orb.giop.ServiceContextTransportingOutputStream.write_to(ServiceContextTransportingOutputStream.java:143)
at org.jacorb.orb.giop.RequestOutputStream.write_to(RequestOutputStream.java:309)
at org.jacorb.orb.giop.GIOPConnection.sendMessage(GIOPConnection.java:1060)

Problem is that, on method write_octet_array Jacorb always adds a new DefferedWriteFrame whithout looking for writing current index.
Comment 1 Corsaire 2013-02-01 16:37:49 UTC
Created attachment 403 [details]
test case
Comment 2 Corsaire 2013-02-01 16:40:55 UTC
Created attachment 404 [details]
proposal correction
Comment 3 Nick Cross 2013-06-21 10:46:52 UTC
Fix and adapted manual test into automated regression test.

https://github.com/JacORB/JacORB/pull/59