<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>1090</bug_id>
          
          <creation_ts>2016-10-19 17:36:30 +0000</creation_ts>
          <short_desc>org.jacorb.orb.TaggedComponentList.removeComponents() generates ArrayIndexOutOfBounds</short_desc>
          <delta_ts>2016-10-28 02:24:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>3.6</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard G. Hash">richard.hash</reporter>
          <assigned_to name="Mailinglist to track bugs">jacorb-bugs</assigned_to>
          <cc>jacorb</cc>
    
    <cc>richard.hash</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3461</commentid>
    <comment_count>0</comment_count>
    <who name="Richard G. Hash">richard.hash</who>
    <bug_when>2016-10-19 17:36:30 +0000</bug_when>
    <thetext>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 &apos;components&apos; if there are any tags to be removed, however the for loop at the end is indexing into both &apos;newComponents&apos; and &apos;components&apos; with the same index and it goes boom when it walks off the end of &apos;newComponents&apos;.

Reported against JacORB-3.6, but the code in 3.7 looks identical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3462</commentid>
    <comment_count>1</comment_count>
    <who name="Richard G. Hash">richard.hash</who>
    <bug_when>2016-10-27 15:47:52 +0000</bug_when>
    <thetext>Pull request #188 was created for this fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3463</commentid>
    <comment_count>2</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2016-10-28 02:24:26 +0000</bug_when>
    <thetext>Pull request merged ; thanks for the contribution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>