Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 1090

Summary: org.jacorb.orb.TaggedComponentList.removeComponents() generates ArrayIndexOutOfBounds
Product: JacORB Reporter: Richard G. Hash <richard.hash>
Component: ORBAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: jacorb, richard.hash
Priority: P5    
Version: 3.6   
Hardware: PC   
OS: All   

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.