Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 1090 - org.jacorb.orb.TaggedComponentList.removeComponents() generates ArrayIndexOutOfBounds
Summary: org.jacorb.orb.TaggedComponentList.removeComponents() generates ArrayIndexOut...
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.6
Hardware: PC All
: P5 normal
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2016-10-19 17:36 UTC by Richard G. Hash
Modified: 2016-10-28 02:24 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard G. Hash 2016-10-19 17:36:30 UTC
In core/src/main/java/org/jacorb/orb/TaggedComponentList.removeComponents(), there is bug that causes an ArrayIndexOutOfBounds to be thrown.

The TaggedComponent[] newComponents is sized smaller than 'components' if there are any tags to be removed, however the for loop at the end is indexing into both 'newComponents' and 'components' with the same index and it goes boom when it walks off the end of 'newComponents'.

Reported against JacORB-3.6, but the code in 3.7 looks identical.
Comment 1 Richard G. Hash 2016-10-27 15:47:52 UTC
Pull request #188 was created for this fix.
Comment 2 Nick Cross 2016-10-28 02:24:26 UTC
Pull request merged ; thanks for the contribution.